mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-11 21:50:34 +05:00
COMP: Support configuring project specifying custom CMAKE_MACOSX_RPATH value
This commit updates the build-system to set CMAKE_MACOSX_RPATH to TRUE only if is not already defined in the current scope. The default behavior remains unchanged. This allows to successfully configure the project with the following options so that RPATH with absolute paths is used for both the build and install trees: -DCMAKE_MACOSX_RPATH:BOOL=FALSE -DCMAKE_INSTALL_NAME_DIR:PATH=/path/to/install/dir
This commit is contained in:
parent
1de4d6e1e5
commit
c718423ba6
@ -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)
|
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)
|
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}")
|
set(CMAKE_INSTALL_RPATH "${NG_RPATH_TOKEN};${NG_RPATH_TOKEN}/${NETGEN_RPATH}")
|
||||||
if(BUILD_FOR_CONDA)
|
if(BUILD_FOR_CONDA)
|
||||||
file(RELATIVE_PATH py_rpath "/bin" "/${NG_INSTALL_DIR_LIB}")
|
file(RELATIVE_PATH py_rpath "/bin" "/${NG_INSTALL_DIR_LIB}")
|
||||||
|
Loading…
Reference in New Issue
Block a user