CMakeGenericSystem.cmake 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic
  2. SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
  3. SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
  4. SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") # -rpath
  5. SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty
  6. SET(CMAKE_INCLUDE_FLAG_C "-I") # -I
  7. SET(CMAKE_INCLUDE_FLAG_C_SEP "") # , or empty
  8. SET(CMAKE_LIBRARY_PATH_FLAG "-L")
  9. SET(CMAKE_LIBRARY_PATH_TERMINATOR "") # for the Digital Mars D compiler the link paths have to be terminated with a "/"
  10. SET(CMAKE_LINK_LIBRARY_FLAG "-l")
  11. SET(CMAKE_LINK_LIBRARY_SUFFIX "")
  12. SET(CMAKE_STATIC_LIBRARY_PREFIX "lib")
  13. SET(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
  14. SET(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib
  15. SET(CMAKE_SHARED_LIBRARY_SUFFIX ".so") # .so
  16. SET(CMAKE_EXECUTABLE_SUFFIX "") # .exe
  17. SET(CMAKE_DL_LIBS "dl")
  18. SET(CMAKE_FIND_LIBRARY_PREFIXES "lib")
  19. SET(CMAKE_FIND_LIBRARY_SUFFIXES ".so" ".a")
  20. # basically all general purpose OSs support shared libs
  21. SET_PROPERTY(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE)
  22. SET (CMAKE_SKIP_RPATH "NO" CACHE BOOL
  23. "If set, runtime paths are not added when using shared libraries.")
  24. SET(CMAKE_INIT_VALUE FALSE)
  25. IF(CMAKE_GENERATOR MATCHES "KDevelop3")
  26. SET(CMAKE_INIT_VALUE TRUE)
  27. ENDIF(CMAKE_GENERATOR MATCHES "KDevelop3")
  28. SET(CMAKE_VERBOSE_MAKEFILE ${CMAKE_INIT_VALUE} CACHE BOOL "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo.")
  29. IF(CMAKE_GENERATOR MATCHES "Makefiles")
  30. SET(CMAKE_COLOR_MAKEFILE ON CACHE BOOL
  31. "Enable/Disable color output during build."
  32. )
  33. MARK_AS_ADVANCED(CMAKE_COLOR_MAKEFILE)
  34. ENDIF(CMAKE_GENERATOR MATCHES "Makefiles")
  35. # Set a variable to indicate whether the value of CMAKE_INSTALL_PREFIX
  36. # was initialized by the block below. This is useful for user
  37. # projects to change the default prefix while still allowing the
  38. # command line to override it.
  39. IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
  40. SET(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT 1)
  41. ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
  42. # Choose a default install prefix for this platform.
  43. IF(CMAKE_HOST_UNIX)
  44. SET(CMAKE_INSTALL_PREFIX "/usr/local"
  45. CACHE PATH "Install path prefix, prepended onto install directories.")
  46. ELSE(CMAKE_HOST_UNIX)
  47. IF("$ENV{ProgramFiles}" MATCHES "^$")
  48. IF("$ENV{SystemDrive}" MATCHES "^$")
  49. SET(CMAKE_GENERIC_PROGRAM_FILES "C:/Program Files")
  50. ELSE("$ENV{SystemDrive}" MATCHES "^$")
  51. SET(CMAKE_GENERIC_PROGRAM_FILES "$ENV{SystemDrive}/Program Files")
  52. ENDIF("$ENV{SystemDrive}" MATCHES "^$")
  53. ELSE("$ENV{ProgramFiles}" MATCHES "^$")
  54. SET(CMAKE_GENERIC_PROGRAM_FILES "$ENV{ProgramFiles}")
  55. ENDIF("$ENV{ProgramFiles}" MATCHES "^$")
  56. SET(CMAKE_INSTALL_PREFIX
  57. "${CMAKE_GENERIC_PROGRAM_FILES}/${PROJECT_NAME}"
  58. CACHE PATH "Install path prefix, prepended onto install directories.")
  59. SET(CMAKE_GENERIC_PROGRAM_FILES)
  60. # Make sure the prefix uses forward slashes.
  61. STRING(REGEX REPLACE "\\\\" "/"
  62. CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
  63. ENDIF(CMAKE_HOST_UNIX)
  64. MARK_AS_ADVANCED(
  65. CMAKE_SKIP_RPATH
  66. CMAKE_VERBOSE_MAKEFILE
  67. )
  68. # always include the gcc compiler information
  69. INCLUDE(Platform/gcc)