Commit 8debfc9b 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 7624c32d
Pipeline #15468 passed with stage
in 44 minutes and 16 seconds
......@@ -132,6 +132,10 @@ SET_TARGET_PROPERTIES(${LIBRARY_NAME} PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/python/${LIBRARY_NAME}"
)
IF(UNIX AND NOT APPLE)
SET_TARGET_PROPERTIES(${LIBRARY_NAME} PROPERTIES INSTALL_RPATH "\$ORIGIN/../../..")
ENDIF()
IF(IS_ABSOLUTE ${PYTHON_SITELIB})
SET(${LIBRARY_NAME}_INSTALL_DIR ${PYTHON_SITELIB}/${LIBRARY_NAME})
ELSE()
......
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