summaryrefslogtreecommitdiff
path: root/mk/cmake-Modules/Platform/UnixPaths.cmake
blob: b852c8224f3e5f7c492a42c85453014b7ea214c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
SET(UNIX 1)

GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${CMAKE_ROOT}" PATH)
GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH)

LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH
  # Standard
  $ENV{BUILDLINK_DIR} $ENV{PREFIX} / /usr
  )

SET(CMAKE_SYSTEM_INCLUDE_PATH ${CMAKE_SYSTEM_INCLUDE_PATH}
  # Standard
  $ENV{BUILDLINK_DIR}/include /include /usr/include 

  )

SET(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SYSTEM_LIBRARY_PATH}
  # Standard
  $ENV{BUILDLINK_DIR}/lib /lib     /usr/lib
  )

SET(CMAKE_SYSTEM_PROGRAM_PATH ${CMAKE_SYSTEM_PROGRAM_PATH}
  $ENV{BUILDLINK_DIR}/bin /bin /usr/bin /sbin
  )

LIST(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
  /lib /usr/lib /usr/lib32 /usr/lib64
  )

# Enable use of lib64 search path variants by default.
SET_PROPERTY(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE)