diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Platform/Darwin.cmake | 3 | ||||
-rw-r--r-- | Modules/Platform/UnixPaths.cmake | 33 | ||||
-rw-r--r-- | Modules/Platform/WindowsPaths.cmake | 36 | ||||
-rw-r--r-- | Modules/Platform/syllable.cmake | 5 |
4 files changed, 44 insertions, 33 deletions
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake index 7ba6c56..4641269 100644 --- a/Modules/Platform/Darwin.cmake +++ b/Modules/Platform/Darwin.cmake @@ -149,5 +149,4 @@ SET(CMAKE_SYSTEM_APPBUNDLE_PATH /Developer/Applications) INCLUDE(Platform/UnixPaths) -SET(CMAKE_SYSTEM_INCLUDE_PATH ${CMAKE_SYSTEM_INCLUDE_PATH} /sw/include) -SET(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SYSTEM_LIBRARY_PATH} /sw/lib) +LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH /sw) diff --git a/Modules/Platform/UnixPaths.cmake b/Modules/Platform/UnixPaths.cmake index 22c9a86..b7f060d 100644 --- a/Modules/Platform/UnixPaths.cmake +++ b/Modules/Platform/UnixPaths.cmake @@ -5,10 +5,21 @@ SET(UNIX 1) GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${CMAKE_ROOT}" PATH) GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH) -SET(CMAKE_SYSTEM_INCLUDE_PATH ${CMAKE_SYSTEM_INCLUDE_PATH} +# List common installation prefixes. These will be used for all +# search types. +LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH # Standard - /include /usr/include /usr/local/include + / /usr /usr/local + # CMake install location + "${_CMAKE_INSTALL_DIR}" + + # Project install destination. + "${CMAKE_INSTALL_PREFIX}" + ) + +# List common include file locations not under the common prefixes. +LIST(APPEND CMAKE_SYSTEM_INCLUDE_PATH # Windows API on Cygwin /usr/include/w32api @@ -19,14 +30,9 @@ SET(CMAKE_SYSTEM_INCLUDE_PATH ${CMAKE_SYSTEM_INCLUDE_PATH} /opt/local/include /usr/pkg/include /opt/csw/include /opt/include /usr/openwin/include - "${_CMAKE_INSTALL_DIR}/include" - "${CMAKE_INSTALL_PREFIX}/include" ) -SET(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SYSTEM_LIBRARY_PATH} - # Standard - /lib /usr/lib /usr/local/lib - +LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH # Windows API on Cygwin /usr/lib/w32api @@ -37,18 +43,13 @@ SET(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SYSTEM_LIBRARY_PATH} /opt/local/lib /usr/pkg/lib /opt/csw/lib /opt/lib /usr/openwin/lib - "${_CMAKE_INSTALL_DIR}/lib" - "${CMAKE_INSTALL_PREFIX}/lib" ) -SET(CMAKE_SYSTEM_PROGRAM_PATH ${CMAKE_SYSTEM_PROGRAM_PATH} - /bin /usr/bin /usr/local/bin /usr/pkg/bin /sbin - "${_CMAKE_INSTALL_DIR}/bin" - "${CMAKE_INSTALL_PREFIX}/bin" +LIST(APPEND CMAKE_SYSTEM_PROGRAM_PATH + /usr/pkg/bin ) -SET(CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES - ${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES} +LIST(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES /lib /usr/lib /usr/lib32 /usr/lib64 ) diff --git a/Modules/Platform/WindowsPaths.cmake b/Modules/Platform/WindowsPaths.cmake index 11fc630..45ed479 100644 --- a/Modules/Platform/WindowsPaths.cmake +++ b/Modules/Platform/WindowsPaths.cmake @@ -1,17 +1,31 @@ GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${CMAKE_ROOT}" PATH) GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH) -# the /bin, /lib and /include dirs are mainly for mingw cross compiler users -# under Linux who use CMAKE_FIND_ROOT_PATH -SET(CMAKE_SYSTEM_INCLUDE_PATH ${CMAKE_SYSTEM_INCLUDE_PATH} - "$ENV{ProgramFiles}" "${CMAKE_INSTALL_PREFIX}/include" "${_CMAKE_INSTALL_DIR}/include" /include) +# List common installation prefixes. These will be used for all +# search types. +LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH + # Standard + "$ENV{ProgramFiles}" + + # CMake install location + "${_CMAKE_INSTALL_DIR}" + + # Project install destination. + "${CMAKE_INSTALL_PREFIX}" + + # MinGW (useful when cross compiling from linux with CMAKE_FIND_ROOT_PATH set) + / + ) + +LIST(APPEND CMAKE_SYSTEM_INCLUDE_PATH + ) # mingw can also link against dlls which can also be in /bin, so list this too -SET(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SYSTEM_LIBRARY_PATH} - "$ENV{ProgramFiles}" - "${CMAKE_INSTALL_PREFIX}/lib" "${CMAKE_INSTALL_PREFIX}/bin" - "${_CMAKE_INSTALL_DIR}/lib" "${_CMAKE_INSTALL_DIR}/bin" - /lib /bin ) +LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH + "${CMAKE_INSTALL_PREFIX}/bin" + "${_CMAKE_INSTALL_DIR}/bin" + /bin + ) -SET(CMAKE_SYSTEM_PROGRAM_PATH ${CMAKE_SYSTEM_PROGRAM_PATH} - "$ENV{ProgramFiles}" "${CMAKE_INSTALL_PREFIX}/bin" "${_CMAKE_INSTALL_DIR}/bin" /bin) +LIST(APPEND CMAKE_SYSTEM_PROGRAM_PATH + ) diff --git a/Modules/Platform/syllable.cmake b/Modules/Platform/syllable.cmake index 32b6197..2bcaf8c 100644 --- a/Modules/Platform/syllable.cmake +++ b/Modules/Platform/syllable.cmake @@ -30,7 +30,4 @@ ENDFOREACH(type) INCLUDE(Platform/UnixPaths) # these are Syllable specific: -SET(CMAKE_SYSTEM_INCLUDE_PATH ${CMAKE_SYSTEM_INCLUDE_PATH} /usr/indexes/include ) -SET(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SYSTEM_LIBRARY_PATH} /usr/indexes/lib ) -SET(CMAKE_SYSTEM_PROGRAM_PATH ${CMAKE_SYSTEM_PROGRAM_PATH} /usr/indexes/bin ) - +LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH /usr/indexes) |