1
0

UnixPaths.cmake 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. SET(UNIX 1)
  2. # also add the install directory of the running cmake to the search directories
  3. # CMAKE_ROOT is CMAKE_INSTALL_PREFIX/share/cmake, so we need to go two levels up
  4. GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${CMAKE_ROOT}" PATH)
  5. GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH)
  6. # List common installation prefixes. These will be used for all
  7. # search types.
  8. LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH
  9. # Standard
  10. / /usr /usr/local
  11. # CMake install location
  12. "${_CMAKE_INSTALL_DIR}"
  13. # Project install destination.
  14. "${CMAKE_INSTALL_PREFIX}"
  15. )
  16. # List common include file locations not under the common prefixes.
  17. LIST(APPEND CMAKE_SYSTEM_INCLUDE_PATH
  18. # Windows API on Cygwin
  19. /usr/include/w32api
  20. # X11
  21. /usr/X11R6/include /usr/include/X11
  22. # Other
  23. /opt/local/include /usr/pkg/include
  24. /opt/csw/include /opt/include
  25. /usr/openwin/include
  26. )
  27. LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH
  28. # Windows API on Cygwin
  29. /usr/lib/w32api
  30. # X11
  31. /usr/X11R6/lib /usr/lib/X11
  32. # Other
  33. /opt/local/lib /usr/pkg/lib
  34. /opt/csw/lib /opt/lib
  35. /usr/openwin/lib
  36. )
  37. LIST(APPEND CMAKE_SYSTEM_PROGRAM_PATH
  38. /usr/pkg/bin
  39. )
  40. LIST(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
  41. /lib /usr/lib /usr/lib32 /usr/lib64
  42. )
  43. LIST(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES
  44. /usr/include
  45. )
  46. LIST(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES
  47. /usr/include
  48. )
  49. # Enable use of lib64 search path variants by default.
  50. SET_PROPERTY(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE)