From 36a0b5173ce8bca71236e3a13895b78494f454ca Mon Sep 17 00:00:00 2001 From: Markus Hovorka Date: Tue, 23 May 2017 08:22:26 +0200 Subject: [PATCH] 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 ...). --- cMake/FreeCadMacros.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cMake/FreeCadMacros.cmake b/cMake/FreeCadMacros.cmake index a3e034996e..60d6bc5ead 100644 --- a/cMake/FreeCadMacros.cmake +++ b/cMake/FreeCadMacros.cmake @@ -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)