AIX.cmake 1.4 KB

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