summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/CMakeLists.txt22
-rw-r--r--Source/Core/DolphinTool/CMakeLists.txt10
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})