Commit ff0ef6bc 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 7951a929
Pipeline #15470 passed with stage
in 12 minutes and 24 seconds
# Copyright 2010-2020, Florent Lamiraux, Thomas Moulard, Olivier Stasse, Guilhem Saurel, JRL, CNRS/AIST, LAAS-CNRS
# Copyright 2010-2021, Florent Lamiraux, Thomas Moulard, Olivier Stasse, Guilhem Saurel, JRL, CNRS/AIST, LAAS-CNRS
SET(PYTHON_MODULE wrap)
......@@ -17,6 +17,10 @@ TARGET_LINK_BOOST_PYTHON(${PYTHON_MODULE} PRIVATE)
# Remove prefix lib
SET_TARGET_PROPERTIES(${PYTHON_MODULE} PROPERTIES PREFIX "")
IF(UNIX AND NOT APPLE)
SET_TARGET_PROPERTIES(${PYTHON_MODULE} PROPERTIES INSTALL_RPATH "\$ORIGIN/../../..")
ENDIF()
INSTALL(TARGETS ${PYTHON_MODULE}
EXPORT ${TARGETS_EXPORT_NAME}
DESTINATION ${PYTHON_SITELIB}/dynamic_graph)
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