mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
Fix netgen executable and library RUNPATHs
netgen defaults to the CMAKE_INSTALL_RPATH, which includes "$ORIGIN", i.e. the BINDIR, but it should only point to the library directories. The libraries are all located in the same directory, so just use "$ORIGIN" for these.
This commit is contained in:
parent
975414c2fe
commit
59d073639d
@ -207,7 +207,8 @@ set(NG_INSTALL_DIR EXPORT netgen-targets RUNTIME DESTINATION ${NG_INSTALL_DIR_BI
|
||||
install(EXPORT netgen-targets DESTINATION ${NG_INSTALL_DIR_CMAKE} COMPONENT netgen_devel)
|
||||
|
||||
set(CMAKE_MACOSX_RPATH TRUE)
|
||||
set(CMAKE_INSTALL_RPATH "${NG_RPATH_TOKEN};${NG_RPATH_TOKEN}/${NETGEN_RPATH}")
|
||||
# Default RPATH used for all libraries
|
||||
set(CMAKE_INSTALL_RPATH "${NG_RPATH_TOKEN}")
|
||||
if(BUILD_FOR_CONDA)
|
||||
file(RELATIVE_PATH py_rpath "/bin" "/${NG_INSTALL_DIR_LIB}")
|
||||
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH};${py_rpath}")
|
||||
|
@ -24,6 +24,7 @@ if(USE_GUI)
|
||||
target_sources(netgen PRIVATE ../windows/netgen.rc)
|
||||
endif(WIN32)
|
||||
target_link_libraries( netgen nglib nggui netgen_python netgen_gui)
|
||||
set_target_properties( netgen PROPERTIES INSTALL_RPATH "${NG_RPATH_TOKEN}/${NETGEN_RPATH}")
|
||||
install(TARGETS netgen ${NG_INSTALL_DIR})
|
||||
if(APPLE)
|
||||
set_target_properties(netgen PROPERTIES OUTPUT_NAME netgen)
|
||||
|
Loading…
Reference in New Issue
Block a user