Skip to content

Commit

Permalink
fix(build): set correct codesigning target (#21)
Browse files Browse the repository at this point in the history
* Correctly set codesigning target for MacOS.

* Don't use system xxhash.

CMake doesn't seem to properly set the link libraries, not sure why.
  • Loading branch information
vladfi1 authored Jun 1, 2024
1 parent bc78c42 commit 8ebc8b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Core/DolphinQt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ if(APPLE)
# 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)
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()
else()
install(TARGETS dolphin-emu RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
Expand Down
6 changes: 6 additions & 0 deletions build-mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
QT_BREW_PATH=$(brew --prefix qt@6)
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/

# Build type
Expand Down

0 comments on commit 8ebc8b6

Please sign in to comment.