From 6f6857fcb9bf93bb8e086e0fd2b00a35a2f348e0 Mon Sep 17 00:00:00 2001 From: f3nix <> Date: Mon, 31 Mar 2008 01:32:15 +0000 Subject: [PATCH] CMake cleanup. --- CMakeLists.txt | 19 +++++-------------- library/CMakeLists.txt | 11 ++++++++--- modules/CMakeLists.txt | 18 +++++++++++++----- 3 files changed, 26 insertions(+), 22 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c1afa4b..60813205 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index 2a01d515..df5256d7 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -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) diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index 89c2ffe1..5921b7f0 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -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)