1
0

AIX.cmake 1.3 KB

1234567891011121314151617181920212223242526272829
  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. set(CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH /usr/lib /lib)
  11. # Files named "libfoo.a" may actually be shared libraries.
  12. set_property(GLOBAL PROPERTY TARGET_ARCHIVES_MAY_BE_SHARED_LIBS 1)
  13. # since .a can be a static or shared library on AIX, we can not do this.
  14. # at some point if we wanted it, we would have to figure out if a .a is
  15. # static or shared, then we could add this back:
  16. # Initialize C link type selection flags. These flags are used when
  17. # building a shared library, shared module, or executable that links
  18. # to other libraries to select whether to use the static or shared
  19. # versions of the libraries.
  20. #foreach(type SHARED_LIBRARY SHARED_MODULE EXE)
  21. # set(CMAKE_${type}_LINK_STATIC_C_FLAGS "-bstatic")
  22. # set(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-bdynamic")
  23. #endforeach()
  24. include(Platform/UnixPaths)