mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Use $ORIGIN to load libs from program directory
The RPATH attribute won't expand relative directories (such as ".") neither can it be a semi-colon separated list; the old way of setting it was wrong and would lead to libraries being loaded from system directories instead.
This commit is contained in:
@@ -8,7 +8,8 @@ set(CPP_SOURCES
|
||||
)
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
set(RPATH_COMMAND "-Wl,-rpath=${RESINSIGHT_FINAL_INSTALL_PATH} -Wl,-rpath=.")
|
||||
# since the compiler passes the option to the linker, double quoting is necessary
|
||||
set (RPATH_COMMAND "-Wl,-rpath,'\\$$ORIGIN'")
|
||||
endif()
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||
|
||||
Reference in New Issue
Block a user