1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
| | From 6ec4f4224aa360d5c233941148465ad1c8c77f33 Mon Sep 17 00:00:00 2001
From: Charles Jackson <charles.b.jackson@protonmail.com>
Date: Mon, 31 Jan 2022 23:24:17 -0600
Subject: [PATCH] Fix rpath
---
CMakeLists.txt | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 010c9b0e..3a959b59 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -610,9 +610,6 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
set(MY_C_LINKER_FLAGS ${MY_C_LINKER_FLAGS} -Wl,-allow-multiple-definition)
- if(CMAKE_PREFIX_PATH)
- list(GET CMAKE_PREFIX_PATH 0 prefix_path_first)
- set(MY_C_LINKER_FLAGS ${MY_C_LINKER_FLAGS} "-Wl,-rpath-link=${prefix_path_first}/lib")
- endif()
+ set(MY_C_LINKER_FLAGS ${MY_C_LINKER_FLAGS} "-Wl,-rpath,$ENV{LIBRARY_PATH}")
endif()
# set linker flags
|