diff --git a/CMakeLists.txt b/CMakeLists.txt index 59fefd5b6..2c49bffd7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -189,7 +189,9 @@ endif(USE_PYTHON) set(NG_INSTALL_DIR EXPORT netgen-targets RUNTIME DESTINATION ${NG_INSTALL_DIR_BIN} COMPONENT netgen LIBRARY DESTINATION ${NG_INSTALL_DIR_LIB} COMPONENT netgen_devel ARCHIVE DESTINATION ${NG_INSTALL_DIR_LIB} COMPONENT netgen_devel) install(EXPORT netgen-targets DESTINATION ${NG_INSTALL_DIR_CMAKE} COMPONENT netgen_devel) -set(CMAKE_MACOSX_RPATH TRUE) +if(NOT DEFINED CMAKE_MACOSX_RPATH) + set(CMAKE_MACOSX_RPATH TRUE) +endif(NOT DEFINED CMAKE_MACOSX_RPATH) set(CMAKE_INSTALL_RPATH "${NG_RPATH_TOKEN};${NG_RPATH_TOKEN}/${NETGEN_RPATH}") if(BUILD_FOR_CONDA) file(RELATIVE_PATH py_rpath "/bin" "/${NG_INSTALL_DIR_LIB}")