CMake cleanup.

This commit is contained in:
f3nix 2008-03-31 01:32:15 +00:00
parent ac3db9886f
commit 6f6857fcb9
3 changed files with 26 additions and 22 deletions

View File

@ -1,15 +1,4 @@
# 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.
project(kicad)
project(kicad-library)
cmake_minimum_required(VERSION 2.4.6 FATAL_ERROR)
@ -19,7 +8,7 @@ if(UNIX)
else(APPLE)
# Like all variables, CMAKE_INSTALL_PREFIX can be over-ridden on the command line.
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_MODULES ${KICAD_DATA}/modules)
set(KICAD_LIBRARY ${KICAD_DATA}/library)
@ -29,11 +18,13 @@ endif(UNIX)
if(WIN32)
# Like all variables, CMAKE_INSTALL_PREFIX can be over-ridden on the command line.
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_LIBRARY library)
endif(WIN32)
mark_as_advanced(KICAD_DATA KICAD_MODULES KICAD_LIBRARY)
# CMake will look in these dirs for nested 'CMakeLists.txt' files.
# Resources.
add_subdirectory(library)

View File

@ -2,6 +2,11 @@ file(GLOB dcm_files "*.dcm")
file(GLOB lib_files "*.lib")
file(GLOB sym_files "*.sym")
install(FILES ${dcm_files} DESTINATION ${KICAD_LIBRARY} COMPONENT resources)
install(FILES ${lib_files} DESTINATION ${KICAD_LIBRARY} COMPONENT resources)
install(FILES ${sym_files} DESTINATION ${KICAD_LIBRARY} COMPONENT resources)
install(FILES ${dcm_files} DESTINATION ${KICAD_LIBRARY}
COMPONENT resources)
install(FILES ${lib_files} DESTINATION ${KICAD_LIBRARY}
COMPONENT resources)
install(FILES ${sym_files} DESTINATION ${KICAD_LIBRARY}
COMPONENT resources)

View File

@ -3,10 +3,18 @@ file(GLOB equ_files "*.equ")
file(GLOB mdc_files "*.mdc")
file(GLOB mod_files "*.mod")
install(FILES ${brd_files} 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(FILES ${brd_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)