diff options
| author | Michael Maltese <michaeljosephmaltese@gmail.com> | 2017-02-03 16:10:59 -0800 |
|---|---|---|
| committer | Michael Maltese <michaeljosephmaltese@gmail.com> | 2017-02-03 22:27:19 -0800 |
| commit | 38816bf51da004e85ab75e9aa7e884df653bf508 (patch) | |
| tree | 54c3f48863615892a50fd7d8d877a775dc5c8c56 /Source | |
| parent | 529dc6aa5330cdd50e17ccbdbe35600f29573c7a (diff) | |
CMake: use BundleUtilities to fix up Dolphin.app
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/DolphinQt2/CMakeLists.txt | 19 | ||||
| -rw-r--r-- | Source/Core/DolphinQt2/qt.conf | 0 | ||||
| -rw-r--r-- | Source/Core/DolphinWX/CMakeLists.txt | 7 |
3 files changed, 15 insertions, 11 deletions
diff --git a/Source/Core/DolphinQt2/CMakeLists.txt b/Source/Core/DolphinQt2/CMakeLists.txt index feb0bb0cf4..877d1ff02d 100644 --- a/Source/Core/DolphinQt2/CMakeLists.txt +++ b/Source/Core/DolphinQt2/CMakeLists.txt @@ -49,13 +49,16 @@ if(APPLE) MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in ) - # Update library references to make the bundle portable - add_custom_command(TARGET ${DOLPHINQT2_BINARY} POST_BUILD - COMMAND echo "Fixing up application bundle: ${BUNDLE_PATH}" - COMMAND echo ${CMAKE_SOURCE_DIR}/Tools/deploy-mac.py $<TARGET_FILE_DIR:${DOLPHINQT2_BINARY}>/../.. - ) + # Copy qt.conf into the bundle + target_sources(${DOLPHINQT2_BINARY} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/qt.conf") + set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/qt.conf" PROPERTIES MACOSX_PACKAGE_LOCATION Resources) + + # Copy Qt plugins into the bundle + get_target_property(qtcocoa_location Qt5::QCocoaIntegrationPlugin LOCATION) + target_sources(${DOLPHINQT2_BINARY} PRIVATE "${qtcocoa_location}") + set_source_files_properties("${qtcocoa_location}" PROPERTIES MACOSX_PACKAGE_LOCATION MacOS/platforms) - # Copy resources in the bundle + # Copy resources into the bundle file(GLOB_RECURSE resources RELATIVE "${CMAKE_SOURCE_DIR}/Data" "${CMAKE_SOURCE_DIR}/Data/Sys/*") foreach(res ${resources}) target_sources(${DOLPHINQT2_BINARY} PRIVATE "${CMAKE_SOURCE_DIR}/Data/${res}") @@ -64,6 +67,10 @@ if(APPLE) MACOSX_PACKAGE_LOCATION "Resources/${resdir}") source_group("Resources" FILES "${CMAKE_SOURCE_DIR}/Data/${res}") endforeach() + + # Update library references to make the bundle portable + include(DolphinPostprocessBundle) + dolphin_postprocess_bundle(${DOLPHINQT2_BINARY}) else() install(TARGETS ${DOLPHINQT2_BINARY} RUNTIME DESTINATION ${bindir}) endif() diff --git a/Source/Core/DolphinQt2/qt.conf b/Source/Core/DolphinQt2/qt.conf new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/Source/Core/DolphinQt2/qt.conf diff --git a/Source/Core/DolphinWX/CMakeLists.txt b/Source/Core/DolphinWX/CMakeLists.txt index 1d4b958b04..020b7bbd59 100644 --- a/Source/Core/DolphinWX/CMakeLists.txt +++ b/Source/Core/DolphinWX/CMakeLists.txt @@ -176,11 +176,8 @@ if(wxWidgets_FOUND) endforeach() # Update library references to make the bundle portable - add_custom_command(TARGET ${DOLPHIN_EXE} POST_BUILD - COMMAND echo "Fixing up application bundle: ${BUNDLE_PATH}" - COMMAND ${CMAKE_SOURCE_DIR}/Tools/deploy-mac.py $<TARGET_FILE_DIR:${DOLPHIN_EXE}>/../.. - ) - + include(DolphinPostprocessBundle) + dolphin_postprocess_bundle(${DOLPHIN_EXE}) # Install bundle into systemwide /Applications directory. install(TARGETS ${DOLPHIN_EXE} DESTINATION /Applications) |
