diff --git a/CMakeLists.txt b/CMakeLists.txt index 358a46b10..420bf163c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,7 +39,7 @@ if (APPLE) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_HOME_DIRECTORY}/bin") set(CMAKE_XCODE_ATTRIBUTE_CONFIGURATION_BUILD_DIR "${CMAKE_HOME_DIRECTORY}/bin/$(CONFIGURATION)") - set(CMAKE_XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS "@executable_path/../Frameworks") + set(CMAKE_XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS "@executable_path/../Frameworks @executable_path/") # Build with clang ang libc++ set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11") diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index fda92d8a5..9f78671ce 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -76,6 +76,8 @@ elseif(APPLE) set_source_files_properties(vcmi.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources) set_source_files_properties(../osx/vcmi_dsa_public.pem PROPERTIES MACOSX_PACKAGE_LOCATION Resources) + set_target_properties(vcmiclient PROPERTIES XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS "@executable_path/../Frameworks @executable_path/") + # Copy server executable, libs and game data to bundle set(BUNDLE_PATH ${CMAKE_HOME_DIRECTORY}/bin/$(CONFIGURATION)/vcmiclient.app/Contents) set(MakeVCMIBundle diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt index d478e96ab..fd97b656e 100644 --- a/server/CMakeLists.txt +++ b/server/CMakeLists.txt @@ -21,9 +21,9 @@ endif() target_link_libraries(vcmiserver vcmi ${Boost_LIBRARIES} ${RT_LIB} ${DL_LIB}) set_target_properties(vcmiserver PROPERTIES ${PCH_PROPERTIES}) +set_target_properties(vcmiserver PROPERTIES XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS "@executable_path/../Frameworks @executable_path/") cotire(vcmiserver) - if (NOT APPLE) # Already inside vcmiclient bundle install(TARGETS vcmiserver DESTINATION ${BIN_DIR}) endif()