CMakeGenericSystem.cmake 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. SET(CMAKE_LINK_LIBRARY_SUFFIX "")
  2. SET(CMAKE_STATIC_LIBRARY_PREFIX "lib")
  3. SET(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
  4. SET(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib
  5. SET(CMAKE_SHARED_LIBRARY_SUFFIX ".so") # .so
  6. SET(CMAKE_DL_LIBS "-ldl")
  7. SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic
  8. SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
  9. SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
  10. SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") # -rpath
  11. SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty
  12. SET(CMAKE_INCLUDE_FLAG_C "-I") # -I
  13. SET(CMAKE_INCLUDE_FLAG_C_SEP "") # , or empty
  14. SET(CMAKE_LIBRARY_PATH_FLAG "-L")
  15. SET(CMAKE_LINK_LIBRARY_FLAG "-l")
  16. IF(CMAKE_COMPILER_IS_GNUCC)
  17. SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic
  18. ENDIF(CMAKE_COMPILER_IS_GNUCC)
  19. IF(CMAKE_COMPILER_IS_GNUCXX)
  20. SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fPIC") # -pic
  21. ENDIF(CMAKE_COMPILER_IS_GNUCXX)
  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. # Choose a default install prefix for this platform.
  30. IF(UNIX)
  31. SET(CMAKE_INSTALL_PREFIX "/usr/local"
  32. CACHE PATH "Install path prefix, prepended onto install directories.")
  33. ELSE(UNIX)
  34. IF("$ENV{SystemDrive}" MATCHES "^$")
  35. SET(CMAKE_GENERIC_SYSTEM_DRIVE "C:")
  36. ELSE("$ENV{SystemDrive}" MATCHES "^$")
  37. SET(CMAKE_GENERIC_SYSTEM_DRIVE "$ENV{SystemDrive}")
  38. ENDIF("$ENV{SystemDrive}" MATCHES "^$")
  39. SET(CMAKE_INSTALL_PREFIX
  40. "${CMAKE_GENERIC_SYSTEM_DRIVE}/Program Files/${PROJECT_NAME}"
  41. CACHE PATH "Install path prefix, prepended onto install directories.")
  42. SET(CMAKE_GENERIC_SYSTEM_DRIVE)
  43. MARK_AS_ADVANCED(CMAKE_INSTALL_PREFIX)
  44. ENDIF(UNIX)
  45. MARK_AS_ADVANCED(
  46. CMAKE_SKIP_RPATH
  47. CMAKE_VERBOSE_MAKEFILE
  48. )
  49. # always include the gcc compiler information
  50. INCLUDE(Platform/gcc)