From 62447277c470552b07177578155a7d4795bd7d2d Mon Sep 17 00:00:00 2001 From: Vlad Firoiu Date: Wed, 7 Feb 2024 05:07:13 +0000 Subject: [PATCH] build(macOS): ignore mbedtls warnings and fix QIcon error (#12) also fix standard codesigning, does not affect our separate method --- Externals/mbedtls/CMakeLists.txt | 2 +- Source/Core/DolphinQt/CMakeLists.txt | 11 ++++++----- Source/Core/DolphinQt/Resources.h | 1 + 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Externals/mbedtls/CMakeLists.txt b/Externals/mbedtls/CMakeLists.txt index 6f448876cbc5..b6d4d3ac5b86 100644 --- a/Externals/mbedtls/CMakeLists.txt +++ b/Externals/mbedtls/CMakeLists.txt @@ -48,7 +48,7 @@ option(ENABLE_ZLIB_SUPPORT "Build mbed TLS with zlib library." OFF) option(ENABLE_PROGRAMS "Build mbed TLS programs." OFF) option(UNSAFE_BUILD "Allow unsafe builds. These builds ARE NOT SECURE." OFF) -option(MBEDTLS_FATAL_WARNINGS "Compiler warnings treated as errors" ON) +option(MBEDTLS_FATAL_WARNINGS "Compiler warnings treated as errors" OFF) string(REGEX MATCH "Clang" CMAKE_COMPILER_IS_CLANG "${CMAKE_C_COMPILER_ID}") string(REGEX MATCH "GNU" CMAKE_COMPILER_IS_GNU "${CMAKE_C_COMPILER_ID}") diff --git a/Source/Core/DolphinQt/CMakeLists.txt b/Source/Core/DolphinQt/CMakeLists.txt index 954b6fe055b2..f0ca6523aefa 100644 --- a/Source/Core/DolphinQt/CMakeLists.txt +++ b/Source/Core/DolphinQt/CMakeLists.txt @@ -569,7 +569,8 @@ target_link_libraries(dolphin-emu PUBLIC slippi-rust-extensions) if(APPLE) include(BundleUtilities) - set(BUNDLE_PATH "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Slippi_Dolphin.app") + set(OUTPUT_NAME "Slippi_Dolphin") + set(BUNDLE_PATH "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${OUTPUT_NAME}.app") # Ask for an application bundle. set_target_properties(dolphin-emu PROPERTIES @@ -577,7 +578,7 @@ if(APPLE) MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS "${CMAKE_CURRENT_SOURCE_DIR}/DolphinEmu.entitlements" XCODE_ATTRIBUTE_OTHER_CODE_SIGN_FLAGS "--deep --options=runtime" - OUTPUT_NAME "Slippi_Dolphin" + OUTPUT_NAME "${OUTPUT_NAME}" ) # Copy qt.conf into the bundle @@ -646,16 +647,16 @@ if(APPLE) # Code sign make file builds add_custom_command(TARGET dolphin-emu POST_BUILD COMMAND - /usr/bin/codesign -f -s "${MACOS_CODE_SIGNING_IDENTITY}" --deep --options=runtime --entitlements "${CMAKE_SOURCE_DIR}/Source/Core/DolphinQt/DolphinEmu$<$:Debug>.entitlements" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Dolphin.app" || true) + /usr/bin/codesign -f -s "${MACOS_CODE_SIGNING_IDENTITY}" --deep --options=runtime --entitlements "${CMAKE_SOURCE_DIR}/Source/Core/DolphinQt/DolphinEmu$<$:Debug>.entitlements" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${OUTPUT_NAME}.app" || true) # Code sign builds for build systems that do have release/debug variants (Xcode) add_custom_command(TARGET dolphin-emu POST_BUILD COMMAND - /usr/bin/codesign -f -s "${MACOS_CODE_SIGNING_IDENTITY}" --deep --options=runtime --entitlements "${CMAKE_SOURCE_DIR}/Source/Core/DolphinQt/DolphinEmuDebug.entitlements" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG}/Dolphin.app" || true) + /usr/bin/codesign -f -s "${MACOS_CODE_SIGNING_IDENTITY}" --deep --options=runtime --entitlements "${CMAKE_SOURCE_DIR}/Source/Core/DolphinQt/DolphinEmuDebug.entitlements" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG}/${OUTPUT_NAME}.app" || true) add_custom_command(TARGET dolphin-emu POST_BUILD COMMAND - /usr/bin/codesign -f -s "${MACOS_CODE_SIGNING_IDENTITY}" --deep --options=runtime --entitlements "${CMAKE_SOURCE_DIR}/Source/Core/DolphinQt/DolphinEmu.entitlements" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE}/Dolphin.app" || true) + /usr/bin/codesign -f -s "${MACOS_CODE_SIGNING_IDENTITY}" --deep --options=runtime --entitlements "${CMAKE_SOURCE_DIR}/Source/Core/DolphinQt/DolphinEmu.entitlements" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE}/${OUTPUT_NAME}.app" || true) endif() else() install(TARGETS dolphin-emu RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) diff --git a/Source/Core/DolphinQt/Resources.h b/Source/Core/DolphinQt/Resources.h index 67ffc23d4d29..6a1b79679623 100644 --- a/Source/Core/DolphinQt/Resources.h +++ b/Source/Core/DolphinQt/Resources.h @@ -5,6 +5,7 @@ #include #include +#include #include namespace DiscIO