diff options
| author | Adya <114347520+AdyaGMD@users.noreply.github.com> | 2026-10-31 10:42:43 +0000 |
|---|---|---|
| committer | Sssnowyyy <78863999+Sssnowyyy@users.noreply.github.com> | 2026-10-31 18:16:44 -0400 |
| commit | b48afba6d34df2c820e7d51e526bf8df73301437 (patch) | |
| tree | 9e8dafebda2ba5454d6b5abb5e5f712451138869 /externals | |
| parent | e36d46693b0cc1324861625ee90e90b4799811d4 (diff) | |
Fix Compilation and crash on MACOS
Diffstat (limited to 'externals')
| -rw-r--r-- | externals/cmake-modules/DetectArchitecture.cmake | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/externals/cmake-modules/DetectArchitecture.cmake b/externals/cmake-modules/DetectArchitecture.cmake index 105963c8c2..be84109994 100644 --- a/externals/cmake-modules/DetectArchitecture.cmake +++ b/externals/cmake-modules/DetectArchitecture.cmake @@ -36,12 +36,17 @@ This file is based off of Yuzu and Dynarmic. # should NOT be too dependent on the architecture # otherwise, you may end up with duplicate code if (CMAKE_OSX_ARCHITECTURES) - set(MULTIARCH_BUILD 1) + list(LENGTH CMAKE_OSX_ARCHITECTURES architecture_count) + if (architecture_count GREATER 1) + set(MULTIARCH_BUILD 1) + else() + set(MULTIARCH_BUILD 0) + endif() set(ARCHITECTURE "${CMAKE_OSX_ARCHITECTURES}") # hope and pray the architecture names match - foreach(ARCH IN ${CMAKE_OSX_ARCHITECTURES}) - set(ARCHITECTURE_${ARCH} 1 PARENT_SCOPE) + foreach(ARCH IN LISTS CMAKE_OSX_ARCHITECTURES) + set(ARCHITECTURE_${ARCH} 1) add_definitions(-DARCHITECTURE_${ARCH}=1) endforeach() @@ -218,4 +223,4 @@ if (NOT DEFINED ARCHITECTURE) add_definitions(-DARCHITECTURE_GENERIC=1) endif() -message(STATUS "[DetectArchitecture] Target architecture: ${ARCHITECTURE}")
\ No newline at end of file +message(STATUS "[DetectArchitecture] Target architecture: ${ARCHITECTURE}") |
