Skip to content
Snippets Groups Projects
Commit 77102ab0 authored by Andre Offringa's avatar Andre Offringa
Browse files

Merge branch 'fix-rpath' into 'master'

Fix rpath to solve requirement for LD_LIBRARY_PATH

See merge request RD/EveryBeam!54
parents f38c88be c582f098
No related branches found
No related tags found
No related merge requests found
......@@ -72,6 +72,24 @@ if (NOT CMAKE_BUILD_TYPE MATCHES Debug)
add_compile_options(-DNDEBUG)
endif()
# The following stuff will set the "rpath" correctly, so that
# LD_LIBRARY_PATH doesn't have to be set.
# use, i.e. don't skip the full RPATH for the build tree
set(CMAKE_SKIP_BUILD_RPATH FALSE)
# when building, don't use the install RPATH already
# (but later on when installing)
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
# the RPATH to be used when installing, but only if it's not a system directory
list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
if("${isSystemDir}" STREQUAL "-1")
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
endif("${isSystemDir}" STREQUAL "-1")
#------------------------------------------------------------------------------
# Find/load top level dependencies
# add_subdirectory(external)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment