Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Modules / Platform / UnixPaths.cmake
blob584d3346c3a9cf0fb8089cdc0bbe0158e452ba77
1 SET(UNIX 1)
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
9 # search types.
10 LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH
11   # Standard
12   / /usr /usr/local
14   # CMake install location
15   "${_CMAKE_INSTALL_DIR}"
17   # Project install destination.
18   "${CMAKE_INSTALL_PREFIX}"
19   )
21 # List common include file locations not under the common prefixes.
22 LIST(APPEND CMAKE_SYSTEM_INCLUDE_PATH
23   # Windows API on Cygwin
24   /usr/include/w32api
26   # X11
27   /usr/X11R6/include /usr/include/X11
29   # Other
30   /opt/local/include /usr/pkg/include
31   /opt/csw/include /opt/include  
32   /usr/openwin/include
33   )
35 LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH
36   # Windows API on Cygwin
37   /usr/lib/w32api
39   # X11
40   /usr/X11R6/lib /usr/lib/X11
42   # Other
43   /opt/local/lib /usr/pkg/lib
44   /opt/csw/lib /opt/lib 
45   /usr/openwin/lib
46   )
48 LIST(APPEND CMAKE_SYSTEM_PROGRAM_PATH
49   /usr/pkg/bin
50   )
52 LIST(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
53   /lib /usr/lib /usr/lib32 /usr/lib64
54   )
56 LIST(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES
57   /usr/include
58   )
59 LIST(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES
60   /usr/include
61   )
63 # Enable use of lib64 search path variants by default.
64 SET_PROPERTY(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE)