Merge pull request #683 from twvd/cryptocmake

Fix building crypto++ for x64 target on Apple silicon MacOS
This commit is contained in:
wheremyfoodat 2024-12-10 23:32:21 +02:00 committed by GitHub
commit 4e2c825277
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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()