diff options
author | Brad King <brad.king@kitware.com> | 2008-01-16 14:51:57 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-01-16 14:51:57 (GMT) |
commit | 2a782880645ad366e724fa0d1657ab233bfe6676 (patch) | |
tree | 444791872299ba8ef88e74357817366d2569d787 /Modules/Platform/WindowsPaths.cmake | |
parent | 34c04bbc245381b83941a2126296ef0973e0642c (diff) | |
download | CMake-2a782880645ad366e724fa0d1657ab233bfe6676.zip CMake-2a782880645ad366e724fa0d1657ab233bfe6676.tar.gz CMake-2a782880645ad366e724fa0d1657ab233bfe6676.tar.bz2 |
ENH: Convert Modules/Platform specification of system search paths to use CMAKE_SYSTEM_PREFIX_PATH when possible.
Diffstat (limited to 'Modules/Platform/WindowsPaths.cmake')
-rw-r--r-- | Modules/Platform/WindowsPaths.cmake | 36 |
1 files changed, 25 insertions, 11 deletions
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 + ) |