From 26e2f9f67a077275ded4ddb9daa3ecb0f1e484e1 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Fri, 17 Jan 2014 13:56:42 -0600 Subject: [PATCH] Formatting, cleanup. --- CMakeLists.txt | 66 ++++++++++++++++++++++++-------------------------- 1 file changed, 31 insertions(+), 35 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f700889..8cbc14a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,45 +1,41 @@ -project(kicad-library) +project( kicad-library ) -if(WIN32) - cmake_minimum_required(VERSION 2.6.1 FATAL_ERROR) -else(WIN32) - cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR) -endif(WIN32) +cmake_minimum_required( VERSION 2.6.1 FATAL_ERROR ) # Locations for install targets. -if(UNIX) - if(APPLE) +if( UNIX ) + if( APPLE ) # Like all variables, CMAKE_INSTALL_PREFIX can be over-ridden on the command line. - set(CMAKE_INSTALL_PREFIX / + set( CMAKE_INSTALL_PREFIX / + CACHE PATH "" ) + # Everything without leading / is relative to CMAKE_INSTALL_PREFIX. + set( KICAD_DATA "Library/Application Support/kicad/" + CACHE PATH "Location of KiCad data files." ) + set( KICAD_MODULES ${KICAD_DATA}/modules ) + set( KICAD_LIBRARY ${KICAD_DATA}/library ) + set( KICAD_TEMPLATE ${KICAD_DATA}/template ) + else() + # Like all variables, CMAKE_INSTALL_PREFIX can be over-ridden on the command line. + set( CMAKE_INSTALL_PREFIX /usr/local CACHE PATH "") # Everything without leading / is relative to CMAKE_INSTALL_PREFIX. - set(KICAD_DATA "Library/Application Support/kicad/" - CACHE PATH "Location of KiCad data files.") - set(KICAD_MODULES ${KICAD_DATA}/modules) - set(KICAD_LIBRARY ${KICAD_DATA}/library) - set(KICAD_TEMPLATE ${KICAD_DATA}/template) - else(APPLE) - # Like all variables, CMAKE_INSTALL_PREFIX can be over-ridden on the command line. - set(CMAKE_INSTALL_PREFIX /usr/local - CACHE PATH "") - # 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) - set(KICAD_TEMPLATE ${KICAD_DATA}/template) - endif(APPLE) -endif(UNIX) + set( KICAD_DATA share/kicad + CACHE PATH "Location of KiCad data files." ) + set( KICAD_MODULES ${KICAD_DATA}/modules ) + set( KICAD_LIBRARY ${KICAD_DATA}/library ) + set( KICAD_TEMPLATE ${KICAD_DATA}/template ) + endif() +endif() if(WIN32) # 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 "" ) # Everything without leading / is relative to CMAKE_INSTALL_PREFIX. - set(KICAD_MODULES modules) - set(KICAD_LIBRARY library) - set(KICAD_TEMPLATE template) -endif(WIN32) + set( KICAD_MODULES modules ) + set( KICAD_LIBRARY library ) + set( KICAD_TEMPLATE template ) +endif() mark_as_advanced( KICAD_DATA KICAD_MODULES KICAD_LIBRARY ) @@ -66,6 +62,6 @@ add_custom_target( uninstall # CMake will look in these dirs for nested 'CMakeLists.txt' files. # Resources. -add_subdirectory(library) -add_subdirectory(modules) -add_subdirectory(template) +add_subdirectory( library ) +add_subdirectory( modules ) +add_subdirectory( template )