Set the multiple architectures as part of the CMake presets instead of the CmakeLists file

This commit is contained in:
halprin
2025-02-08 21:42:26 -07:00
parent 4150819161
commit 3126dbfe12
2 changed files with 5 additions and 1 deletions

View File

@@ -170,7 +170,6 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
message("Building for MAC OSX")
add_compile_definitions(POSIX MACOSX=1 _USE_OGL_ACTIVE_TEXTURES PRIMARY_HOG=\"d3-osx.hog\")
set(PLATFORM_INCLUDES "lib/linux" ${SDL2_INCLUDE_DIR} ${SDL2_INCLUDE_DIRS})
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64")
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
# Windows.h defines to avoid as many issues as possible.
add_compile_definitions(WIN32_LEAN_AND_MEAN NOMINMAX NODRAWTEXT NOBITMAP NOMCX NOSERVICE PRIMARY_HOG=\"d3-win.hog\"

View File

@@ -31,6 +31,11 @@
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Darwin"
},
"cacheVariables": {
"VCPKG_TARGET_TRIPLET": "universal-osx",
"CMAKE_OSX_ARCHITECTURES": "arm64;x86_64",
"VCPKG_OSX_ARCHITECTURES": "arm64;x86_64"
}
},
{