Honor CMAKE_INSTALL_RPATH in SET_BIN_DIR
set_target_properties used up until now in the SET_BIN_DIR macro sets the INSTALL_RPATH property and discards whatever it contained before. The INSTALL_RPATH target property is initialized with the cache variable CMAKE_INSTALL_RPATH (possilbly given via the -D option of cmake). To preserve this "default" value this commit replaced set_target_properties with set_property(... APPEND ...).
This commit is contained in:
@@ -239,9 +239,9 @@ MACRO(SET_BIN_DIR ProjectName OutputName)
|
||||
# FreeCADBase, SMDS, Driver, MEFISTO2 and area-native libs don't depend on parts from CMAKE_INSTALL_LIBDIR
|
||||
if(NOT ${ProjectName} MATCHES "^(FreeCADBase|SMDS|Driver|MEFISTO2|area-native)$")
|
||||
if(${ARGC} STREQUAL 4)
|
||||
set_target_properties(${ProjectName} PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}${ARGV3})
|
||||
set_property(TARGET ${ProjectName} APPEND PROPERTY INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}${ARGV3})
|
||||
else(${ARGC} STREQUAL 4)
|
||||
set_target_properties(${ProjectName} PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_LIBDIR})
|
||||
set_property(TARGET ${ProjectName} APPEND PROPERTY INSTALL_RPATH ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
endif()
|
||||
endif(WIN32)
|
||||
|
||||
Reference in New Issue
Block a user