3 # also add the install directory of the running cmake to the search directories
4 # CMAKE_ROOT is CMAKE_INSTALL_PREFIX/share/cmake, so we need to go two levels up
5 GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${CMAKE_ROOT}" PATH)
6 GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH)
8 # List common installation prefixes. These will be used for all
10 LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH
14 # CMake install location
15 "${_CMAKE_INSTALL_DIR}"
17 # Project install destination.
18 "${CMAKE_INSTALL_PREFIX}"
21 # List common include file locations not under the common prefixes.
22 LIST(APPEND CMAKE_SYSTEM_INCLUDE_PATH
23 # Windows API on Cygwin
27 /usr/X11R6/include /usr/include/X11
30 /opt/local/include /usr/pkg/include
31 /opt/csw/include /opt/include
35 LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH
36 # Windows API on Cygwin
40 /usr/X11R6/lib /usr/lib/X11
43 /opt/local/lib /usr/pkg/lib
48 LIST(APPEND CMAKE_SYSTEM_PROGRAM_PATH
52 LIST(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
53 /lib /usr/lib /usr/lib32 /usr/lib64
56 LIST(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES
59 LIST(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES
63 # Enable use of lib64 search path variants by default.
64 SET_PROPERTY(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE)