mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-27 10:57:22 +08:00
cmake: make SDL_CPU_xxx variable visible when using CMAKE_OSX_ARCHITECTURES
(cherry picked from commit ebb52973e1)
This commit is contained in:
committed by
Ozkan Sezer
parent
4d88280931
commit
393d99338f
+3
-3
@@ -4,15 +4,15 @@ function(SDL_DetectTargetCPUArchitectures DETECTED_ARCHS)
|
|||||||
|
|
||||||
if(APPLE AND CMAKE_OSX_ARCHITECTURES)
|
if(APPLE AND CMAKE_OSX_ARCHITECTURES)
|
||||||
foreach(known_arch IN LISTS known_archs)
|
foreach(known_arch IN LISTS known_archs)
|
||||||
set(SDL_CPU_${known_arch} "0")
|
set(SDL_CPU_${known_arch} "0" PARENT_SCOPE)
|
||||||
endforeach()
|
endforeach()
|
||||||
set(detected_archs)
|
set(detected_archs)
|
||||||
foreach(osx_arch IN LISTS CMAKE_OSX_ARCHITECTURES)
|
foreach(osx_arch IN LISTS CMAKE_OSX_ARCHITECTURES)
|
||||||
if(osx_arch STREQUAL "x86_64")
|
if(osx_arch STREQUAL "x86_64")
|
||||||
set(SDL_CPU_X64 "1")
|
set(SDL_CPU_X64 "1" PARENT_SCOPE)
|
||||||
list(APPEND detected_archs "X64")
|
list(APPEND detected_archs "X64")
|
||||||
elseif(osx_arch STREQUAL "arm64")
|
elseif(osx_arch STREQUAL "arm64")
|
||||||
set(SDL_CPU_ARM64 "1")
|
set(SDL_CPU_ARM64 "1" PARENT_SCOPE)
|
||||||
list(APPEND detected_archs "ARM64")
|
list(APPEND detected_archs "ARM64")
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|||||||
Reference in New Issue
Block a user