Fix building crypto++ for x64 target on Apple silicon MacOS

This commit is contained in:
Thomas 2024-12-10 21:34:03 +01:00
parent 54978542d2
commit d3946f8fe5

View file

@ -209,7 +209,10 @@ function(DumpMachine output pattern)
set(${output} 0 PARENT_SCOPE)
else ()
if(CMAKE_SYSTEM_PROCESSOR MATCHES ${pattern})
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "" AND CMAKE_SYSTEM_PROCESSOR MATCHES ${pattern})
set(${output} TRUE PARENT_SCOPE)
endif()
if(CMAKE_OSX_ARCHITECTURES MATCHES ${pattern})
set(${output} TRUE PARENT_SCOPE)
endif()
endif()