CMakeLists: Support multi-architecture builds

This commit is contained in:
Merry 2023-01-06 14:27:06 +00:00
parent c72ee5473b
commit 6b41b5be07
9 changed files with 59 additions and 19 deletions

View file

@ -1,5 +1,11 @@
include(CheckSymbolExists)
if (CMAKE_OSX_ARCHITECTURES)
set(DYNARMIC_MULTIARCH_BUILD 1)
set(ARCHITECTURE "${CMAKE_OSX_ARCHITECTURES}")
return()
endif()
function(detect_architecture symbol arch)
if (NOT DEFINED ARCHITECTURE)
set(CMAKE_REQUIRED_QUIET YES)