diff --git a/CMakeExternals/Boost-post_install-APPLE.cmake b/CMakeExternals/Boost-post_install-APPLE.cmake index 0ae85b9331..994043073b 100644 --- a/CMakeExternals/Boost-post_install-APPLE.cmake +++ b/CMakeExternals/Boost-post_install-APPLE.cmake @@ -1,11 +1,8 @@ -message(STATUS "Fixing relative dependencies") +message(STATUS "Make Boost libraries use RPATH") file(GLOB boost_dylibs ./libboost*.dylib) -foreach(in ${boost_dylibs}) - foreach(other_boost_dylib ${boost_dylibs}) - get_filename_component(from ${other_boost_dylib} NAME) - set(to "@rpath/${from}") - execute_process(COMMAND install_name_tool -change ${from} ${to} ${in}) - endforeach() +foreach(boost_dylib ${boost_dylibs}) + get_filename_component(boost_dylib ${boost_dylib} NAME) + execute_process(COMMAND install_name_tool -id @rpath/${boost_dylib} ${boost_dylib}) endforeach()