SunOS.cmake 706 B

1234567891011121314151617181920212223
  1. if(CMAKE_SYSTEM MATCHES "SunOS-4")
  2. set(CMAKE_C_COMPILE_OPTIONS_PIC "-PIC")
  3. set(CMAKE_C_COMPILE_OPTIONS_PIE "-PIE")
  4. set(CMAKE_SHARED_LIBRARY_C_FLAGS "-PIC")
  5. set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,-r")
  6. set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-R")
  7. set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
  8. endif()
  9. include(Platform/UnixPaths)
  10. list(APPEND CMAKE_SYSTEM_PREFIX_PATH
  11. /opt/csw
  12. /opt/openwin
  13. )
  14. # The Sun linker needs to find transitive shared library dependencies
  15. # in the -L path.
  16. set(CMAKE_LINK_DEPENDENT_LIBRARY_DIRS 1)
  17. # Shared libraries with no builtin soname may not be linked safely by
  18. # specifying the file path.
  19. set(CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME 1)