CMake cleanup.
This commit is contained in:
parent
ac3db9886f
commit
6f6857fcb9
3 changed files with 26 additions and 22 deletions
|
@ -1,15 +1,4 @@
|
||||||
# List of variables that may be set from command line:
|
project(kicad-library)
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
project(kicad)
|
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 2.4.6 FATAL_ERROR)
|
cmake_minimum_required(VERSION 2.4.6 FATAL_ERROR)
|
||||||
|
|
||||||
|
@ -19,7 +8,7 @@ if(UNIX)
|
||||||
else(APPLE)
|
else(APPLE)
|
||||||
# Like all variables, CMAKE_INSTALL_PREFIX can be over-ridden on the command line.
|
# Like all variables, CMAKE_INSTALL_PREFIX can be over-ridden on the command line.
|
||||||
set(CMAKE_INSTALL_PREFIX /usr/local CACHE PATH "")
|
set(CMAKE_INSTALL_PREFIX /usr/local CACHE PATH "")
|
||||||
# When used later, "bin" and others with no leading / is relative to CMAKE_INSTALL_PREFIX.
|
# Everything without leading / is relative to CMAKE_INSTALL_PREFIX.
|
||||||
set(KICAD_DATA share/kicad CACHE PATH "Location of KiCad data files.")
|
set(KICAD_DATA share/kicad CACHE PATH "Location of KiCad data files.")
|
||||||
set(KICAD_MODULES ${KICAD_DATA}/modules)
|
set(KICAD_MODULES ${KICAD_DATA}/modules)
|
||||||
set(KICAD_LIBRARY ${KICAD_DATA}/library)
|
set(KICAD_LIBRARY ${KICAD_DATA}/library)
|
||||||
|
@ -29,11 +18,13 @@ endif(UNIX)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
# Like all variables, CMAKE_INSTALL_PREFIX can be over-ridden on the command line.
|
# Like all variables, CMAKE_INSTALL_PREFIX can be over-ridden on the command line.
|
||||||
set(CMAKE_INSTALL_PREFIX c:/kicad CACHE PATH "")
|
set(CMAKE_INSTALL_PREFIX c:/kicad CACHE PATH "")
|
||||||
# When used later, "winexe" and others with no leading / is relative to CMAKE_INSTALL_PREFIX.
|
# Everything without leading / is relative to CMAKE_INSTALL_PREFIX.
|
||||||
set(KICAD_MODULES modules)
|
set(KICAD_MODULES modules)
|
||||||
set(KICAD_LIBRARY library)
|
set(KICAD_LIBRARY library)
|
||||||
endif(WIN32)
|
endif(WIN32)
|
||||||
|
|
||||||
|
mark_as_advanced(KICAD_DATA KICAD_MODULES KICAD_LIBRARY)
|
||||||
|
|
||||||
# CMake will look in these dirs for nested 'CMakeLists.txt' files.
|
# CMake will look in these dirs for nested 'CMakeLists.txt' files.
|
||||||
# Resources.
|
# Resources.
|
||||||
add_subdirectory(library)
|
add_subdirectory(library)
|
||||||
|
|
|
@ -2,6 +2,11 @@ file(GLOB dcm_files "*.dcm")
|
||||||
file(GLOB lib_files "*.lib")
|
file(GLOB lib_files "*.lib")
|
||||||
file(GLOB sym_files "*.sym")
|
file(GLOB sym_files "*.sym")
|
||||||
|
|
||||||
install(FILES ${dcm_files} DESTINATION ${KICAD_LIBRARY} COMPONENT resources)
|
install(FILES ${dcm_files} DESTINATION ${KICAD_LIBRARY}
|
||||||
install(FILES ${lib_files} DESTINATION ${KICAD_LIBRARY} COMPONENT resources)
|
COMPONENT resources)
|
||||||
install(FILES ${sym_files} DESTINATION ${KICAD_LIBRARY} COMPONENT resources)
|
|
||||||
|
install(FILES ${lib_files} DESTINATION ${KICAD_LIBRARY}
|
||||||
|
COMPONENT resources)
|
||||||
|
|
||||||
|
install(FILES ${sym_files} DESTINATION ${KICAD_LIBRARY}
|
||||||
|
COMPONENT resources)
|
||||||
|
|
|
@ -3,10 +3,18 @@ file(GLOB equ_files "*.equ")
|
||||||
file(GLOB mdc_files "*.mdc")
|
file(GLOB mdc_files "*.mdc")
|
||||||
file(GLOB mod_files "*.mod")
|
file(GLOB mod_files "*.mod")
|
||||||
|
|
||||||
install(FILES ${brd_files} DESTINATION ${KICAD_MODULES} COMPONENT resources)
|
install(FILES ${brd_files} DESTINATION ${KICAD_MODULES}
|
||||||
install(FILES ${equ_files} DESTINATION ${KICAD_MODULES} COMPONENT resources)
|
COMPONENT resources)
|
||||||
install(FILES ${mdc_files} DESTINATION ${KICAD_MODULES} COMPONENT resources)
|
|
||||||
install(FILES ${mod_files} DESTINATION ${KICAD_MODULES} COMPONENT resources)
|
|
||||||
|
|
||||||
install(DIRECTORY packages3d DESTINATION ${KICAD_MODULES} COMPONENT resources
|
install(FILES ${equ_files} DESTINATION ${KICAD_MODULES}
|
||||||
|
COMPONENT resources)
|
||||||
|
|
||||||
|
install(FILES ${mdc_files} DESTINATION ${KICAD_MODULES}
|
||||||
|
COMPONENT resources)
|
||||||
|
|
||||||
|
install(FILES ${mod_files} DESTINATION ${KICAD_MODULES}
|
||||||
|
COMPONENT resources)
|
||||||
|
|
||||||
|
install(DIRECTORY packages3d DESTINATION ${KICAD_MODULES}
|
||||||
|
COMPONENT resources
|
||||||
PATTERN ".svn" EXCLUDE)
|
PATTERN ".svn" EXCLUDE)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue