From 1a76d3e84de0ccc7c76efebb3b451473adfac520 Mon Sep 17 00:00:00 2001 From: Robert MacGregor Date: Wed, 22 Jun 2022 09:36:47 -0400 Subject: [PATCH] * BugFix: Remove the absolute rpath removal to prevent build errors on MacOS in some cases. --- Engine/source/CMakeLists.txt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Engine/source/CMakeLists.txt b/Engine/source/CMakeLists.txt index e8c406adc..c099cf5bd 100644 --- a/Engine/source/CMakeLists.txt +++ b/Engine/source/CMakeLists.txt @@ -348,11 +348,8 @@ if (APPLE) add_executable(${TORQUE_APP_NAME} MACOSX_BUNDLE ${TORQUE_SOURCE_FILES}) set_target_properties(${TORQUE_APP_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_BINARY_DIR}/temp/Info.plist") - # Ensure the shared libraries are actually referenced at the correct path - add_custom_command(TARGET ${TORQUE_APP_NAME} POST_BUILD COMMAND install_name_tool -add_rpath "@executable_path/../Frameworks" ${TORQUE_APP_GAME_DIRECTORY}/${TORQUE_APP_NAME}.app/Contents/MacOS/${TORQUE_APP_NAME}) - - # Clear the absolute rpath generated by default - add_custom_command(TARGET ${TORQUE_APP_NAME} POST_BUILD COMMAND install_name_tool -delete_rpath "${TORQUE_APP_GAME_DIRECTORY}/${TORQUE_APP_NAME}.app/Contents/Frameworks" ${TORQUE_APP_GAME_DIRECTORY}/${TORQUE_APP_NAME}.app/Contents/MacOS/${TORQUE_APP_NAME}) + # Ensure the shared libraries are actually referenced at the correct path + add_custom_command(TARGET ${TORQUE_APP_NAME} POST_BUILD COMMAND install_name_tool -add_rpath "@executable_path/../Frameworks" ${TORQUE_APP_GAME_DIRECTORY}/${TORQUE_APP_NAME}.app/Contents/MacOS/${TORQUE_APP_NAME}) elseif (WIN32) add_executable(${TORQUE_APP_NAME} WIN32 ${TORQUE_SOURCE_FILES})