diff --git a/CMakeLists.txt b/CMakeLists.txt index 47f8ebdca8581..c62be499e4952 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -597,7 +597,14 @@ if(DEFINED ENV{LDFLAGS}) deduplicate_flags(CMAKE_EXE_LINKER_FLAGS) endif() -set(CMAKE_SKIP_RPATH TRUE) +# TODO: The `CMAKE_SKIP_BUILD_RPATH` variable setting can be deleted +# in the future after reordering Guix script commands to +# perform binary checks after the installation step. +# Relevant discussions: +# - https://github.com/hebasto/bitcoin/pull/236#issuecomment-2183120953 +# - https://github.com/bitcoin/bitcoin/pull/30312#issuecomment-2191235833 +set(CMAKE_SKIP_BUILD_RPATH TRUE) +set(CMAKE_SKIP_INSTALL_RPATH TRUE) add_subdirectory(src) add_subdirectory(test) add_subdirectory(doc) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index bb466e6868cca..6116b817bc403 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -355,6 +355,15 @@ if(BUILD_UTIL_CHAINSTATE) add_executable(bitcoin-chainstate bitcoin-chainstate.cpp ) + # TODO: The `SKIP_BUILD_RPATH` property setting can be deleted + # in the future after reordering Guix script commands to + # perform binary checks after the installation step. + # Relevant discussions: + # - https://github.com/hebasto/bitcoin/pull/236#issuecomment-2183120953 + # - https://github.com/bitcoin/bitcoin/pull/30312#issuecomment-2191235833 + set_target_properties(bitcoin-chainstate PROPERTIES + SKIP_BUILD_RPATH OFF + ) target_link_libraries(bitcoin-chainstate PRIVATE core_interface