From 9c2fc1ee27eb18c64e19dc294de4be0cee980a9a Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Sat, 16 Dec 2023 19:11:24 +0000 Subject: [PATCH] fixup! cmake: Build `libbitcoinconsensus` library Fix rpath for installed binaries --- src/bench/CMakeLists.txt | 4 ++++ src/test/CMakeLists.txt | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/bench/CMakeLists.txt b/src/bench/CMakeLists.txt index 3a1295a319c7a..b454b1b4bff3f 100644 --- a/src/bench/CMakeLists.txt +++ b/src/bench/CMakeLists.txt @@ -71,6 +71,10 @@ endif() make_bitcoinconsensus_dll_available(bench_bitcoin) +set_target_properties(bench_bitcoin PROPERTIES + INSTALL_RPATH $ORIGIN/../lib +) + install(TARGETS bench_bitcoin RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt index 2fd836e63f1b6..81f09dfe875c6 100644 --- a/src/test/CMakeLists.txt +++ b/src/test/CMakeLists.txt @@ -176,6 +176,10 @@ endif() make_bitcoinconsensus_dll_available(test_bitcoin) +set_target_properties(test_bitcoin PROPERTIES + INSTALL_RPATH $ORIGIN/../lib +) + install(TARGETS test_bitcoin RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )