Commit 89e2385e authored by Ghislain MARY's avatar Ghislain MARY

Handle RPATH correctly (at least on Linux) so that the binaries can be...

Handle RPATH correctly (at least on Linux) so that the binaries can be executed without setting the LD_LIBRARY_PATH environment variable when CMAKE_INSTALL_PREFIX is not a system path.
parent 601453ef
......@@ -220,6 +220,7 @@ endmacro(linphone_builder_expand_external_project_vars)
list(APPEND LINPHONE_BUILDER_EP_VARS
CMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH
CMAKE_BUILD_TYPE:STRING
CMAKE_BUILD_WITH_INSTALL_RPATH:BOOL
CMAKE_BUNDLE_OUTPUT_DIRECTORY:PATH
CMAKE_C_FLAGS_DEBUG:STRING
CMAKE_C_FLAGS_MINSIZEREL:STRING
......@@ -238,6 +239,8 @@ list(APPEND LINPHONE_BUILDER_EP_VARS
CMAKE_EXE_LINKER_FLAGS:STRING
CMAKE_EXTRA_GENERATOR:STRING
CMAKE_INSTALL_PREFIX:PATH
CMAKE_INSTALL_RPATH:PATH
CMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL
CMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING
......@@ -254,6 +257,7 @@ list(APPEND LINPHONE_BUILDER_EP_VARS
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING
CMAKE_SHARED_LINKER_FLAGS:STRING
CMAKE_SKIP_RPATH:BOOL
CMAKE_SKIP_BUILD_RPATH:BOOL
CMAKE_VERBOSE_MAKEFILE:BOOL
MSVC_C_ARCHITECTURE_ID:STRING
MSVC_CXX_ARCHITECTURE_ID:STRING
......
......@@ -70,6 +70,12 @@ else() # Windows
endif()
list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" _IS_SYSTEM_DIR)
if("${_IS_SYSTEM_DIR}" STREQUAL "-1")
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
endif()
# Include builders
include(builders/CMakeLists.txt)
......
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