From c242469e8b139cf8f634e7907ebed1e83d8f8434 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Mon, 18 Feb 2019 15:22:30 +0100 Subject: [PATCH] cmake: Keep rpath on NetBSD Otherwise it'd fail to find pcre2 in the invocation tests. --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index eb7949f7e..d7ae17b8f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,6 +56,14 @@ ELSE() SET(FISH_IN_TREE_BUILD FALSE) ENDIF() +# NetBSD does weird things with finding libraries, +# making the tests fail by failing to find pcre. +# +# Keep the rpath used to build. +IF(CMAKE_SYSTEM_NAME STREQUAL NetBSD) + SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) +ENDIF() + # All objects that the system needs to build fish, except fish.cpp SET(FISH_SRCS src/autoload.cpp src/builtin.cpp src/builtin_bg.cpp src/builtin_bind.cpp