2008-03-04 21:32:38 +01:00
|
|
|
# List of variables that may be set from command line:
|
|
|
|
#
|
|
|
|
# CMAKE_VERBOSE_MAKEFILE ON/OFF (OPTIONAL)
|
|
|
|
# Turns ON/OFF verbose build messages.
|
|
|
|
# You can also pass VERBOSE=1 to make for the same effect.
|
|
|
|
#
|
|
|
|
# CMAKE_INSTALL_PREFIX (OPTIONAL)
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# Our project is called 'kicad'. This is what it will be called in
|
|
|
|
# our makefiles.
|
2008-03-11 16:57:54 +01:00
|
|
|
project(kicad)
|
2008-03-04 21:32:38 +01:00
|
|
|
|
2008-03-11 16:57:54 +01:00
|
|
|
cmake_minimum_required(VERSION 2.4.6 FATAL_ERROR)
|
2008-03-04 21:32:38 +01:00
|
|
|
|
|
|
|
# Locations for install targets.
|
2008-03-11 16:57:54 +01:00
|
|
|
if(UNIX)
|
|
|
|
if(APPLE)
|
|
|
|
else(APPLE)
|
2008-03-04 21:32:38 +01:00
|
|
|
# Like all variables, CMAKE_INSTALL_PREFIX can be over-ridden on the command line.
|
2008-03-11 16:57:54 +01:00
|
|
|
set(CMAKE_INSTALL_PREFIX /usr/local CACHE PATH "")
|
2008-03-04 21:32:38 +01:00
|
|
|
# When used later, "bin" and others with no leading / is relative to CMAKE_INSTALL_PREFIX.
|
2008-03-11 16:57:54 +01:00
|
|
|
set(KICAD_DATA share/kicad CACHE PATH "Location of KiCad data files.")
|
|
|
|
set(KICAD_MODULES ${KICAD_DATA}/modules)
|
|
|
|
set(KICAD_LIBRARY ${KICAD_DATA}/library)
|
|
|
|
endif(APPLE)
|
|
|
|
endif(UNIX)
|
2008-03-04 21:32:38 +01:00
|
|
|
|
2008-03-11 16:57:54 +01:00
|
|
|
if(WIN32)
|
2008-03-04 21:32:38 +01:00
|
|
|
# Like all variables, CMAKE_INSTALL_PREFIX can be over-ridden on the command line.
|
2008-03-11 16:57:54 +01:00
|
|
|
set(CMAKE_INSTALL_PREFIX c:/kicad CACHE PATH "")
|
2008-03-04 21:32:38 +01:00
|
|
|
# When used later, "winexe" and others with no leading / is relative to CMAKE_INSTALL_PREFIX.
|
2008-03-11 16:57:54 +01:00
|
|
|
set(KICAD_MODULES modules)
|
|
|
|
set(KICAD_LIBRARY library)
|
|
|
|
endif(WIN32)
|
2008-03-04 21:32:38 +01:00
|
|
|
|
|
|
|
# CMake will look in these dirs for nested 'CMakeLists.txt' files.
|
|
|
|
# Resources.
|
2008-03-11 16:57:54 +01:00
|
|
|
add_subdirectory(library)
|
|
|
|
add_subdirectory(modules)
|