SunOS.cmake 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. IF(CMAKE_SYSTEM MATCHES "SunOS-4.*")
  2. SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-PIC")
  3. SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,-r")
  4. SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "-Wl,-R")
  5. SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP ":")
  6. ENDIF(CMAKE_SYSTEM MATCHES "SunOS-4.*")
  7. IF(CMAKE_SYSTEM MATCHES "SunOS-5*.")
  8. SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-KPIC")
  9. SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-G")
  10. SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "-R")
  11. SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP ":")
  12. SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-KPIC")
  13. SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-G")
  14. SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-R")
  15. SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP ":")
  16. IF(CMAKE_COMPILER_IS_GNUCC)
  17. SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC")
  18. SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared")
  19. SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "-Wl,-R")
  20. SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP ":")
  21. ENDIF(CMAKE_COMPILER_IS_GNUCC)
  22. IF(CMAKE_COMPILER_IS_GNUCXX)
  23. SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fPIC")
  24. SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-shared")
  25. SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-Wl,-R")
  26. SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP ":")
  27. ENDIF(CMAKE_COMPILER_IS_GNUCXX)
  28. ENDIF(CMAKE_SYSTEM MATCHES "SunOS-5*.")
  29. IF(CMAKE_COMPILER_IS_GNUCXX)
  30. IF(CMAKE_COMPILER_IS_GNUCC)
  31. SET(CMAKE_CXX_CREATE_SHARED_LIBRARY
  32. "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
  33. ELSE(CMAKE_COMPILER_IS_GNUCC)
  34. # Take default rule from CMakeDefaultMakeRuleVariables.cmake.
  35. ENDIF(CMAKE_COMPILER_IS_GNUCC)
  36. ELSE(CMAKE_COMPILER_IS_GNUCXX)
  37. SET(CMAKE_CXX_CREATE_STATIC_LIBRARY
  38. "<CMAKE_CXX_COMPILER> -xar -o <TARGET> <OBJECTS> "
  39. "<CMAKE_RANLIB> <TARGET> ")
  40. ENDIF(CMAKE_COMPILER_IS_GNUCXX)