2
#=============================================================================
3
# Copyright 2006-2009 Kitware, Inc.
5
# Distributed under the OSI-approved BSD License (the "License");
6
# see accompanying file Copyright.txt for details.
8
# This software is distributed WITHOUT ANY WARRANTY; without even the
9
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10
# See the License for more information.
11
#=============================================================================
12
# (To distribute this file outside of CMake, substitute the full
13
# License text for the above reference.)
15
# Block multiple inclusion because "CMakeCInformation.cmake" includes
16
# "Platform/${CMAKE_SYSTEM_NAME}" even though the generic module
17
# "CMakeSystemSpecificInformation.cmake" already included it.
18
# The extra inclusion is a work-around documented next to the include()
19
# call, so this can be removed when the work-around is removed.
20
IF(__UNIX_PATHS_INCLUDED)
23
SET(__UNIX_PATHS_INCLUDED 1)
27
# also add the install directory of the running cmake to the search directories
28
# CMAKE_ROOT is CMAKE_INSTALL_PREFIX/share/cmake, so we need to go two levels up
29
GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${CMAKE_ROOT}" PATH)
30
GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH)
32
# List common installation prefixes. These will be used for all
34
LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH
38
# CMake install location
39
"${_CMAKE_INSTALL_DIR}"
41
# Project install destination.
42
"${CMAKE_INSTALL_PREFIX}"
45
# List common include file locations not under the common prefixes.
46
LIST(APPEND CMAKE_SYSTEM_INCLUDE_PATH
47
# Windows API on Cygwin
51
/usr/X11R6/include /usr/include/X11
55
/opt/csw/include /opt/include
59
LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH
60
# Windows API on Cygwin
64
/usr/X11R6/lib /usr/lib/X11
72
LIST(APPEND CMAKE_SYSTEM_PROGRAM_PATH
76
LIST(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
77
/lib /usr/lib /usr/lib32 /usr/lib64
80
LIST(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES
83
LIST(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES
87
# Enable use of lib64 search path variants by default.
88
SET_PROPERTY(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE)