CMakeGenericSystem.cmake 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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_LINK_LIBRARY_FLAG "-l")
  10. SET(CMAKE_LINK_LIBRARY_SUFFIX "")
  11. SET(CMAKE_STATIC_LIBRARY_PREFIX "lib")
  12. SET(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
  13. SET(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib
  14. SET(CMAKE_SHARED_LIBRARY_SUFFIX ".so") # .so
  15. SET(CMAKE_EXECUTABLE_SUFFIX "") # .exe
  16. SET(CMAKE_DL_LIBS "dl")
  17. SET(CMAKE_FIND_LIBRARY_PREFIXES "lib")
  18. SET(CMAKE_FIND_LIBRARY_SUFFIXES ".so" ".a")
  19. SET (CMAKE_SKIP_RPATH "NO" CACHE BOOL
  20. "If set, runtime paths are not added when using shared libraries.")
  21. SET(CMAKE_INIT_VALUE FALSE)
  22. IF(CMAKE_GENERATOR MATCHES "KDevelop3")
  23. SET(CMAKE_INIT_VALUE TRUE)
  24. ENDIF(CMAKE_GENERATOR MATCHES "KDevelop3")
  25. 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.")
  26. IF(CMAKE_GENERATOR MATCHES "Makefiles")
  27. SET(CMAKE_COLOR_MAKEFILE ON CACHE BOOL
  28. "Enable/Disable color output during build."
  29. )
  30. MARK_AS_ADVANCED(CMAKE_COLOR_MAKEFILE)
  31. ENDIF(CMAKE_GENERATOR MATCHES "Makefiles")
  32. # Set a variable to indicate whether the value of CMAKE_INSTALL_PREFIX
  33. # was initialized by the block below. This is useful for user
  34. # projects to change the default prefix while still allowing the
  35. # command line to override it.
  36. IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
  37. SET(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT 1)
  38. ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
  39. # Choose a default install prefix for this platform.
  40. IF(UNIX)
  41. SET(CMAKE_INSTALL_PREFIX "/usr/local"
  42. CACHE PATH "Install path prefix, prepended onto install directories.")
  43. ELSE(UNIX)
  44. IF("$ENV{ProgramFiles}" MATCHES "^$")
  45. IF("$ENV{SystemDrive}" MATCHES "^$")
  46. SET(CMAKE_GENERIC_PROGRAM_FILES "C:/Program Files")
  47. ELSE("$ENV{SystemDrive}" MATCHES "^$")
  48. SET(CMAKE_GENERIC_PROGRAM_FILES "$ENV{SystemDrive}/Program Files")
  49. ENDIF("$ENV{SystemDrive}" MATCHES "^$")
  50. ELSE("$ENV{ProgramFiles}" MATCHES "^$")
  51. SET(CMAKE_GENERIC_PROGRAM_FILES "$ENV{ProgramFiles}")
  52. ENDIF("$ENV{ProgramFiles}" MATCHES "^$")
  53. SET(CMAKE_INSTALL_PREFIX
  54. "${CMAKE_GENERIC_PROGRAM_FILES}/${PROJECT_NAME}"
  55. CACHE PATH "Install path prefix, prepended onto install directories.")
  56. SET(CMAKE_GENERIC_PROGRAM_FILES)
  57. # Make sure the prefix uses forward slashes.
  58. STRING(REGEX REPLACE "\\\\" "/"
  59. CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
  60. ENDIF(UNIX)
  61. MARK_AS_ADVANCED(
  62. CMAKE_SKIP_RPATH
  63. CMAKE_VERBOSE_MAKEFILE
  64. )
  65. # always include the gcc compiler information
  66. INCLUDE(Platform/gcc)