Commit 5a21557b authored by Matthew Hanna's avatar Matthew Hanna Committed by Brad King

AIX,HP: Allow user to override the default runtime path (libpath)

The `CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH` is used by CMake to always
append `-Wl,-blibpath:/usr/lib:/lib` to the link line.  This is needed
by default on these platforms but needs to be overridden in some use
cases (e.g. an environment in which one maintains versioned shared
libraries).  Change our logic to set this value only if it not already
set by the user, project, or toolchain file.
parent 7d2a0aa7
......@@ -8,7 +8,9 @@ set(CMAKE_DL_LIBS "-lld")
# -Wl,-blibpath:/usr/lib:/lib whether RPATH support is on or not.
# When our own RPATH is to be added it may be inserted before the
# "always" paths.
set(CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH /usr/lib /lib)
if(NOT DEFINED CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH)
set(CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH /usr/lib /lib)
endif()
# Files named "libfoo.a" may actually be shared libraries.
set_property(GLOBAL PROPERTY TARGET_ARCHIVES_MAY_BE_SHARED_LIBS 1)
......
set(CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH /usr/lib)
if(NOT DEFINED CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH)
set(CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH /usr/lib)
endif()
if(NOT CMAKE_SYSTEM_PROCESSOR STREQUAL "ia64")
set(CMAKE_SHARED_LIBRARY_SUFFIX ".sl") # .so
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment