fix(build): set correct codesigning target (#21)

* Correctly set codesigning target for MacOS.

* Don't use system xxhash.

CMake doesn't seem to properly set the link libraries, not sure why.
This commit is contained in:
Vlad Firoiu 2024-06-01 16:27:32 -04:00 committed by GitHub
commit 8ebc8b6ad7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View file

@ -674,7 +674,7 @@ if(APPLE)
# POST_BUILD COMMAND # 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}/${OUTPUT_NAME}.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)
add_custom_command(TARGET dolphin-emu POST_BUILD 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$<$<CONFIG:Debug>:Debug>.entitlements" "$<TARGET_BUNDLE_DIR:OUTPUT_NAME>") COMMAND /usr/bin/codesign -f -s "${MACOS_CODE_SIGNING_IDENTITY}" --deep --options=runtime --entitlements "${CMAKE_SOURCE_DIR}/Source/Core/DolphinQt/DolphinEmu$<$<CONFIG:Debug>:Debug>.entitlements" "$<TARGET_BUNDLE_DIR:dolphin-emu>")
endif() endif()
else() else()
install(TARGETS dolphin-emu RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) install(TARGETS dolphin-emu RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

View file

@ -4,6 +4,12 @@
QT_BREW_PATH=$(brew --prefix qt@6) QT_BREW_PATH=$(brew --prefix qt@6)
CMAKE_FLAGS="-DQT_DIR=${QT_BREW_PATH}/lib/cmake/Qt6 -DENABLE_NOGUI=false" CMAKE_FLAGS="-DQT_DIR=${QT_BREW_PATH}/lib/cmake/Qt6 -DENABLE_NOGUI=false"
# For some reason the system xxhash library doesn't get properly linked,
# at least on my M1. The clang command gets -lxxhash, but probably needs
# -L/opt/homebrew/lib/ to actually find the library.
if [[ $(arch) == 'arm64' ]]; then
CMAKE_FLAGS+=" -DUSE_SYSTEM_XXHASH=OFF"
fi
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/lib:/usr/lib/ export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/lib:/usr/lib/
# Build type # Build type