add custom command to install_name_tool -add_rpath

This commit is contained in:
Fadhil Mandaga 2019-10-27 07:27:21 +07:00
parent c6da1f050b
commit 14e47e43f9
No known key found for this signature in database
GPG Key ID: EA9D1DDA5EEA5536
1 changed files with 5 additions and 0 deletions

View File

@ -427,6 +427,11 @@ if(APPLE)
# Update library references to make the bundle portable
include(DolphinPostprocessBundle)
dolphin_postprocess_bundle(dolphin-emu)
# Fix rpath
add_custom_command(TARGET dolphin-emu
POST_BUILD COMMAND
${CMAKE_INSTALL_NAME_TOOL} -add_rpath "@executable_path/../Frameworks/"
$<TARGET_FILE:dolphin-emu>)
else()
install(TARGETS dolphin-emu RUNTIME DESTINATION ${bindir})
endif()