diff options
| author | Joshua Vandaƫle <joshua@vandaele.software> | 2026-11-06 23:35:02 +0100 |
|---|---|---|
| committer | Joshua Vandaƫle <joshua@vandaele.software> | 2026-11-07 00:26:32 +0100 |
| commit | b183f8ea97c29eef5bd5b3832fb7f72697b3dd12 (patch) | |
| tree | ebf0a8bb12bd13504510bafdfb54937889c92b5d /Source | |
| parent | 4a70679d0adcd17220568f5c18d2d4005eeea0a2 (diff) | |
CMake: Bundle dolphin-tool on macOS
I do not own an Apple device and as such this is completely untested by myself. A user requesting this feature on Discord has confirmed this makes dolphin-tool show up. Most of these changes come from looking at what already exists for DolphinQt and the Mac Updater.
Related issue: https://bugs.dolphin-emu.org/issues/13259
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/CMakeLists.txt | 22 | ||||
| -rw-r--r-- | Source/Core/DolphinTool/CMakeLists.txt | 10 |
2 files changed, 32 insertions, 0 deletions
diff --git a/Source/Core/CMakeLists.txt b/Source/Core/CMakeLists.txt index b1c5a3ab17..2bc7e3e481 100644 --- a/Source/Core/CMakeLists.txt +++ b/Source/Core/CMakeLists.txt @@ -76,6 +76,28 @@ if (APPLE AND ENABLE_QT) endif() endif() + if (ENABLE_CLI_TOOL) + add_dependencies(build_final_bundle dolphin-tool) + + add_custom_command(TARGET build_final_bundle + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E make_directory + "${DOLPHIN_MAC_BUNDLE}/Contents/Helpers" + + COMMAND ${CMAKE_COMMAND} -E copy + "$<TARGET_FILE:dolphin-tool>" + "${DOLPHIN_MAC_BUNDLE}/Contents/Helpers/dolphin-tool") + + if (MACOS_CODE_SIGNING) + add_custom_command(TARGET build_final_bundle + POST_BUILD + COMMAND "${CMAKE_SOURCE_DIR}/Tools/mac-codesign.sh" + "-t" + "${MACOS_CODE_SIGNING_IDENTITY}" + "${DOLPHIN_MAC_BUNDLE}/Contents/Helpers/dolphin-tool") + endif() + endif() + if (MACOS_CODE_SIGNING) add_custom_command(TARGET build_final_bundle POST_BUILD diff --git a/Source/Core/DolphinTool/CMakeLists.txt b/Source/Core/DolphinTool/CMakeLists.txt index cbc15fe85f..fad24ad655 100644 --- a/Source/Core/DolphinTool/CMakeLists.txt +++ b/Source/Core/DolphinTool/CMakeLists.txt @@ -33,6 +33,16 @@ if(MSVC) target_link_libraries(dolphin-tool PRIVATE use_pch) endif() +if(APPLE) + if(MACOS_CODE_SIGNING) + add_custom_command(TARGET dolphin-tool + POST_BUILD + COMMAND "${CMAKE_SOURCE_DIR}/Tools/mac-codesign.sh" + "${MACOS_CODE_SIGNING_IDENTITY}" + "$<TARGET_FILE:dolphin-tool>") + endif() +endif() + set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} dolphin-tool) if (NOT WIN32) install(TARGETS dolphin-tool RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) |
