Skip to content

Commit cd175bf

Browse files
committed
some rpath tricks to resolve shared libs
1 parent 58fcb13 commit cd175bf

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

main/dengitor/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ set_target_properties(dengitor PROPERTIES
5757
#export all. useful for connecting g_signal
5858
ENABLE_EXPORTS TRUE
5959
WINDOWS_EXPORT_ALL_SYMBOLS TRUE
60+
INSTALL_RPATH "$ORIGIN/../dengine-${DENGINE_VERSION}/"
6061
C_STANDARD 99
6162
)
6263

main/dengitor/dengitor.sh.in

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
#!/bin/bash
2-
cd ../lib/dengitor-@DENGINE_VERSION@
3-
export LD_LIBRARY_PATH="../../lib/dengine-@DENGINE_VERSION@:${LD_LIBRARY_PATH:-}"
4-
./dengitor
2+
exec "$(dirname "$(readlink -f "$0")")/../lib/dengitor-@DENGINE_VERSION@/dengitor" "$@"

tests/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ get_directory_property(subdirs SUBDIRECTORIES)
2424
foreach(subdir ${subdirs})
2525
get_directory_property(dir_tgts DIRECTORY ${subdir} BUILDSYSTEM_TARGETS)
2626
set_target_properties(${dir_tgts} PROPERTIES
27-
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin")
27+
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin"
28+
INSTALL_RPATH "$ORIGIN/../")
29+
30+
2831
install(TARGETS ${dir_tgts} DESTINATION ${tests_install_dir})
2932
endforeach()
3033
if(MINGW)

0 commit comments

Comments
 (0)