ENH: Convert Modules/Platform specification of system search paths to use CMAKE_SYSTEM_PREFIX_PATH when possible.
This commit is contained in:
parent
34c04bbc24
commit
2a78288064
|
@ -149,5 +149,4 @@ SET(CMAKE_SYSTEM_APPBUNDLE_PATH
|
||||||
/Developer/Applications)
|
/Developer/Applications)
|
||||||
|
|
||||||
INCLUDE(Platform/UnixPaths)
|
INCLUDE(Platform/UnixPaths)
|
||||||
SET(CMAKE_SYSTEM_INCLUDE_PATH ${CMAKE_SYSTEM_INCLUDE_PATH} /sw/include)
|
LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH /sw)
|
||||||
SET(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SYSTEM_LIBRARY_PATH} /sw/lib)
|
|
||||||
|
|
|
@ -5,10 +5,21 @@ SET(UNIX 1)
|
||||||
GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${CMAKE_ROOT}" PATH)
|
GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${CMAKE_ROOT}" PATH)
|
||||||
GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" 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
|
# 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
|
# Windows API on Cygwin
|
||||||
/usr/include/w32api
|
/usr/include/w32api
|
||||||
|
|
||||||
|
@ -19,14 +30,9 @@ SET(CMAKE_SYSTEM_INCLUDE_PATH ${CMAKE_SYSTEM_INCLUDE_PATH}
|
||||||
/opt/local/include /usr/pkg/include
|
/opt/local/include /usr/pkg/include
|
||||||
/opt/csw/include /opt/include
|
/opt/csw/include /opt/include
|
||||||
/usr/openwin/include
|
/usr/openwin/include
|
||||||
"${_CMAKE_INSTALL_DIR}/include"
|
|
||||||
"${CMAKE_INSTALL_PREFIX}/include"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SYSTEM_LIBRARY_PATH}
|
LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH
|
||||||
# Standard
|
|
||||||
/lib /usr/lib /usr/local/lib
|
|
||||||
|
|
||||||
# Windows API on Cygwin
|
# Windows API on Cygwin
|
||||||
/usr/lib/w32api
|
/usr/lib/w32api
|
||||||
|
|
||||||
|
@ -37,18 +43,13 @@ SET(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SYSTEM_LIBRARY_PATH}
|
||||||
/opt/local/lib /usr/pkg/lib
|
/opt/local/lib /usr/pkg/lib
|
||||||
/opt/csw/lib /opt/lib
|
/opt/csw/lib /opt/lib
|
||||||
/usr/openwin/lib
|
/usr/openwin/lib
|
||||||
"${_CMAKE_INSTALL_DIR}/lib"
|
|
||||||
"${CMAKE_INSTALL_PREFIX}/lib"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(CMAKE_SYSTEM_PROGRAM_PATH ${CMAKE_SYSTEM_PROGRAM_PATH}
|
LIST(APPEND CMAKE_SYSTEM_PROGRAM_PATH
|
||||||
/bin /usr/bin /usr/local/bin /usr/pkg/bin /sbin
|
/usr/pkg/bin
|
||||||
"${_CMAKE_INSTALL_DIR}/bin"
|
|
||||||
"${CMAKE_INSTALL_PREFIX}/bin"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
|
LIST(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
|
||||||
${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}
|
|
||||||
/lib /usr/lib /usr/lib32 /usr/lib64
|
/lib /usr/lib /usr/lib32 /usr/lib64
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,31 @@
|
||||||
GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${CMAKE_ROOT}" PATH)
|
GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${CMAKE_ROOT}" PATH)
|
||||||
GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH)
|
GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH)
|
||||||
|
|
||||||
# the /bin, /lib and /include dirs are mainly for mingw cross compiler users
|
# List common installation prefixes. These will be used for all
|
||||||
# under Linux who use CMAKE_FIND_ROOT_PATH
|
# search types.
|
||||||
SET(CMAKE_SYSTEM_INCLUDE_PATH ${CMAKE_SYSTEM_INCLUDE_PATH}
|
LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH
|
||||||
"$ENV{ProgramFiles}" "${CMAKE_INSTALL_PREFIX}/include" "${_CMAKE_INSTALL_DIR}/include" /include)
|
# 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
|
# 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}
|
LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH
|
||||||
"$ENV{ProgramFiles}"
|
"${CMAKE_INSTALL_PREFIX}/bin"
|
||||||
"${CMAKE_INSTALL_PREFIX}/lib" "${CMAKE_INSTALL_PREFIX}/bin"
|
"${_CMAKE_INSTALL_DIR}/bin"
|
||||||
"${_CMAKE_INSTALL_DIR}/lib" "${_CMAKE_INSTALL_DIR}/bin"
|
/bin
|
||||||
/lib /bin )
|
)
|
||||||
|
|
||||||
SET(CMAKE_SYSTEM_PROGRAM_PATH ${CMAKE_SYSTEM_PROGRAM_PATH}
|
LIST(APPEND CMAKE_SYSTEM_PROGRAM_PATH
|
||||||
"$ENV{ProgramFiles}" "${CMAKE_INSTALL_PREFIX}/bin" "${_CMAKE_INSTALL_DIR}/bin" /bin)
|
)
|
||||||
|
|
|
@ -30,7 +30,4 @@ ENDFOREACH(type)
|
||||||
INCLUDE(Platform/UnixPaths)
|
INCLUDE(Platform/UnixPaths)
|
||||||
|
|
||||||
# these are Syllable specific:
|
# these are Syllable specific:
|
||||||
SET(CMAKE_SYSTEM_INCLUDE_PATH ${CMAKE_SYSTEM_INCLUDE_PATH} /usr/indexes/include )
|
LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH /usr/indexes)
|
||||||
SET(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SYSTEM_LIBRARY_PATH} /usr/indexes/lib )
|
|
||||||
SET(CMAKE_SYSTEM_PROGRAM_PATH ${CMAKE_SYSTEM_PROGRAM_PATH} /usr/indexes/bin )
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue