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

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