Skip to content

Commit

Permalink
ci: 修复mac编译错误
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO committed Sep 8, 2023
1 parent 1b6bfd3 commit 9e2f5a6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ jobs:
CXX: "/usr/local/opt/llvm/bin/clang++"
run: |
cmake --preset 'NinjaMulti' \
-DARCH='${{ matrix.arch == 'x86_64' && 'x64' || 'arm64' }}' \
-DM9A_HASH_VERSION='${{ needs.meta.outputs.tag }}'
cmake --build build --preset 'NinjaMulti - Release' -j 16
Expand Down
11 changes: 4 additions & 7 deletions cmake/config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,10 @@ endif ()

if (APPLE)
set(CMAKE_INSTALL_RPATH "@loader_path;@executable_path")
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
add_compile_definitions(MAA_USE_FMTLIB)
add_compile_options("-Wno-deprecated-declarations") # supress tmpnam
if ("${MAADEPS_TRIPLET}" STREQUAL "maa-arm64-osx")
add_compile_options("-arch;arm64")
add_link_options("-arch;arm64")
endif ()
add_compile_options("-Wno-deprecated-declarations") # supress tmpnam
if ("${ARCH}" STREQUAL "arm64")
add_compile_options("-arch;arm64")
add_link_options("-arch;arm64")
endif ()
elseif (UNIX)
set(CMAKE_INSTALL_RPATH "$ORIGIN")
Expand Down
File renamed without changes.

0 comments on commit 9e2f5a6

Please sign in to comment.