Skip to content

Commit 11115e9

Browse files
committed
cmake: Always provide RPATH on NetBSD
1 parent bb57017 commit 11115e9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,8 +580,13 @@ endif()
580580
# Relevant discussions:
581581
# - https://github.com/hebasto/bitcoin/pull/236#issuecomment-2183120953
582582
# - https://github.com/bitcoin/bitcoin/pull/30312#issuecomment-2191235833
583-
set(CMAKE_SKIP_BUILD_RPATH TRUE)
584-
set(CMAKE_SKIP_INSTALL_RPATH TRUE)
583+
# NetBSD always requires runtime paths to be set for executables.
584+
if(CMAKE_SYSTEM_NAME STREQUAL "NetBSD")
585+
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
586+
else()
587+
set(CMAKE_SKIP_BUILD_RPATH TRUE)
588+
set(CMAKE_SKIP_INSTALL_RPATH TRUE)
589+
endif()
585590
add_subdirectory(test)
586591
add_subdirectory(doc)
587592

0 commit comments

Comments
 (0)