From 74e5814a48d8c16eb86f73e64c843913e1b6a4b6 Mon Sep 17 00:00:00 2001 From: SamGondelman Date: Fri, 12 Aug 2016 13:35:57 -0700 Subject: [PATCH] try to fix rpath issue --- assignment-client/CMakeLists.txt | 5 +++++ domain-server/CMakeLists.txt | 5 +++++ interface/CMakeLists.txt | 3 ++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/assignment-client/CMakeLists.txt b/assignment-client/CMakeLists.txt index d0fd2c1176..773ef845e2 100644 --- a/assignment-client/CMakeLists.txt +++ b/assignment-client/CMakeLists.txt @@ -1,5 +1,10 @@ set(TARGET_NAME assignment-client) +# Fix up the rpath so macdeployqt works +if (APPLE) + set_target_properties(${TARGET_NAME} PROPERTIES INSTALL_RPATH "@executable_path/../Frameworks") +endif () + setup_hifi_project(Core Gui Network Script Quick Widgets WebSockets) # link in the shared libraries diff --git a/domain-server/CMakeLists.txt b/domain-server/CMakeLists.txt index b7eb8c0138..8a14907da3 100644 --- a/domain-server/CMakeLists.txt +++ b/domain-server/CMakeLists.txt @@ -6,6 +6,11 @@ else () set(_SHOULD_SYMLINK_RESOURCES FALSE) endif () +# Fix up the rpath so macdeployqt works +if (APPLE) + set_target_properties(${TARGET_NAME} PROPERTIES INSTALL_RPATH "@executable_path/../Frameworks") +endif () + # setup the project and link required Qt modules setup_hifi_project(Network) diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index f712c4cc21..f999a1a8f2 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -123,7 +123,8 @@ if (APPLE) add_executable(${TARGET_NAME} MACOSX_BUNDLE ${INTERFACE_SRCS} ${QM}) # make sure the output name for the .app bundle is correct - set_target_properties(${TARGET_NAME} PROPERTIES OUTPUT_NAME ${INTERFACE_BUNDLE_NAME}) + # Fix up the rpath so macdeployqt works + set_target_properties(${TARGET_NAME} PROPERTIES INSTALL_RPATH "@executable_path/../Frameworks") elseif (WIN32) # configure an rc file for the chosen icon set(CONFIGURE_ICON_PATH "${CMAKE_CURRENT_SOURCE_DIR}/icon/${INTERFACE_ICON_FILENAME}")