Skip to content

Commit 5011116

Browse files
authored
Merge pull request #241 from nim65s/topic/rpath
[CMake] set INSTALL_RPATH for python on linux
2 parents 99454d6 + 7e3c1f4 commit 5011116

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

python/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2014-2020 CNRS INRIA
2+
# Copyright (c) 2014-2021 CNRS INRIA
33
#
44

55
# --- LIBRARY --- #
@@ -33,6 +33,10 @@ SET_TARGET_PROPERTIES(${PYWRAP}
3333
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/python/${PROJECT_NAME}"
3434
)
3535

36+
IF(UNIX AND NOT APPLE)
37+
SET_TARGET_PROPERTIES(${PYWRAP} PROPERTIES INSTALL_RPATH "\$ORIGIN/../../..")
38+
ENDIF()
39+
3640
INSTALL(TARGETS ${PYWRAP} DESTINATION ${${PYWRAP}_INSTALL_DIR})
3741

3842
# --- INSTALL SCRIPTS

0 commit comments

Comments
 (0)