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:
Markus Hovorka
2017-05-23 08:22:26 +02:00
committed by wmayer
parent 5bfc0757c0
commit 4816c1c5af

View File

@@ -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)