Update CMakeLists.txt to set CMAKE_SYSTEM_PROCESSOR explicitely

This commit is contained in:
Alex Spataru 2024-11-20 11:08:22 -05:00 committed by GitHub
parent 39562080c9
commit 9c887579fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -54,6 +54,18 @@ add_definitions(-DPROJECT_VERSION="${PROJECT_VERSION}")
add_definitions(-DPROJECT_APPCAST="${PROJECT_APPCAST}")
add_definitions(-DPROJECT_DISPNAME="${PROJECT_DISPNAME}")
#-------------------------------------------------------------------------------
# CPU architecture configuration
#-------------------------------------------------------------------------------
if(APPLE)
if(CMAKE_OSX_ARCHITECTURES MATCHES "x86_64")
set(CMAKE_SYSTEM_PROCESSOR "x86_64")
elseif(CMAKE_OSX_ARCHITECTURES MATCHES "arm64")
set(CMAKE_SYSTEM_PROCESSOR "arm64")
endif()
endif()
#-------------------------------------------------------------------------------
# Compiler flags
#-------------------------------------------------------------------------------