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
Pipeline #15467 passed with stage
in 10 minutes and 28 seconds
#
# 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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment