2008-03-31 03:32:15 +02:00
|
|
|
project(kicad-library)
|
2008-03-04 21:32:38 +01:00
|
|
|
|
2008-09-07 21:32:07 +02:00
|
|
|
if(WIN32)
|
|
|
|
cmake_minimum_required(VERSION 2.6.1 FATAL_ERROR)
|
|
|
|
else(WIN32)
|
|
|
|
cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR)
|
|
|
|
endif(WIN32)
|
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-09-07 21:32:07 +02:00
|
|
|
set(CMAKE_INSTALL_PREFIX /usr/local
|
|
|
|
CACHE PATH "")
|
2008-03-31 03:32:15 +02:00
|
|
|
# Everything without leading / is relative to CMAKE_INSTALL_PREFIX.
|
2008-09-07 21:32:07 +02:00
|
|
|
set(KICAD_DATA share/kicad
|
|
|
|
CACHE PATH "Location of KiCad data files.")
|
2008-03-11 16:57:54 +01:00
|
|
|
set(KICAD_MODULES ${KICAD_DATA}/modules)
|
|
|
|
set(KICAD_LIBRARY ${KICAD_DATA}/library)
|
2013-12-02 16:51:33 +01:00
|
|
|
set(KICAD_TEMPLATE ${KICAD_DATA}/template)
|
2008-03-11 16:57:54 +01:00
|
|
|
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-09-07 21:32:07 +02:00
|
|
|
set(CMAKE_INSTALL_PREFIX c:/kicad
|
|
|
|
CACHE PATH "")
|
2008-03-31 03:32:15 +02:00
|
|
|
# Everything without leading / is relative to CMAKE_INSTALL_PREFIX.
|
2008-03-11 16:57:54 +01:00
|
|
|
set(KICAD_MODULES modules)
|
|
|
|
set(KICAD_LIBRARY library)
|
2013-12-02 16:51:33 +01:00
|
|
|
set(KICAD_TEMPLATE template)
|
2008-03-11 16:57:54 +01:00
|
|
|
endif(WIN32)
|
2008-03-04 21:32:38 +01:00
|
|
|
|
2013-10-31 19:38:35 +01:00
|
|
|
mark_as_advanced( KICAD_DATA KICAD_MODULES KICAD_LIBRARY )
|
|
|
|
|
|
|
|
|
2013-12-02 16:51:33 +01:00
|
|
|
if( UNIX )
|
|
|
|
set( KICAD_USER_CONFIG_DIR $ENV{HOME} CACHE PATH "Location of user specifig KiCad config files" )
|
|
|
|
elseif( MINGW )
|
|
|
|
set( KICAD_USER_CONFIG_DIR $ENV{%APPDATA%} CACHE PATH "Location of user specifig KiCad config files" )
|
|
|
|
endif()
|
|
|
|
mark_as_advanced( KICAD_USER_CONFIG_DIR )
|
|
|
|
|
|
|
|
|
2013-10-31 19:38:35 +01:00
|
|
|
#================================================
|
|
|
|
# "make uninstall" rules
|
|
|
|
#================================================
|
|
|
|
configure_file(
|
|
|
|
"${PROJECT_SOURCE_DIR}/CMakeModules/cmake_uninstall.cmake.in"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
|
|
|
IMMEDIATE @ONLY )
|
|
|
|
|
|
|
|
add_custom_target( uninstall
|
|
|
|
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" )
|
|
|
|
|
2008-03-31 03:32:15 +02:00
|
|
|
|
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)
|
2013-04-13 23:27:04 +02:00
|
|
|
add_subdirectory(template)
|