AIX.cmake 1.3 KB

12345678910111213141516171819202122232425262728293031
  1. set(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib
  2. set(CMAKE_SHARED_LIBRARY_SUFFIX ".so") # .so
  3. set(CMAKE_DL_LIBS "-lld")
  4. # RPATH support on AIX is called libpath. By default the runtime
  5. # libpath is paths specified by -L followed by /usr/lib and /lib. In
  6. # order to prevent the -L paths from being used we must force use of
  7. # -Wl,-blibpath:/usr/lib:/lib whether RPATH support is on or not.
  8. # When our own RPATH is to be added it may be inserted before the
  9. # "always" paths.
  10. if(NOT DEFINED CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH)
  11. set(CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH /usr/lib /lib)
  12. endif()
  13. # Files named "libfoo.a" may actually be shared libraries.
  14. set_property(GLOBAL PROPERTY TARGET_ARCHIVES_MAY_BE_SHARED_LIBS 1)
  15. # since .a can be a static or shared library on AIX, we can not do this.
  16. # at some point if we wanted it, we would have to figure out if a .a is
  17. # static or shared, then we could add this back:
  18. # Initialize C link type selection flags. These flags are used when
  19. # building a shared library, shared module, or executable that links
  20. # to other libraries to select whether to use the static or shared
  21. # versions of the libraries.
  22. #foreach(type SHARED_LIBRARY SHARED_MODULE EXE)
  23. # set(CMAKE_${type}_LINK_STATIC_C_FLAGS "-bstatic")
  24. # set(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-bdynamic")
  25. #endforeach()
  26. include(Platform/UnixPaths)