Skip to content
Snippets Groups Projects
Commit 7e3c1f44 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

[CMake] set INSTALL_RPATH for python on linux

To avoid the need to set `LD_LIBRARY_PATH` when the
`CMAKE_INSTALL_PREFIX` is not a standard one.
parent 99454d62
No related branches found
No related tags found
No related merge requests found
#
# Copyright (c) 2014-2020 CNRS INRIA
# Copyright (c) 2014-2021 CNRS INRIA
#
# --- LIBRARY --- #
......@@ -33,6 +33,10 @@ SET_TARGET_PROPERTIES(${PYWRAP}
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/python/${PROJECT_NAME}"
)
IF(UNIX AND NOT APPLE)
SET_TARGET_PROPERTIES(${PYWRAP} PROPERTIES INSTALL_RPATH "\$ORIGIN/../../..")
ENDIF()
INSTALL(TARGETS ${PYWRAP} DESTINATION ${${PYWRAP}_INSTALL_DIR})
# --- INSTALL SCRIPTS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment