vcpkg/ports/qnnpack/fix-arm64-osx.patch
autoantwort ecd55433fd
[qnnpack] fix arm64-osx (#24237)
* [qnnpack] no arm osx

* fix arm64-osx instead

Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
2022-04-21 12:08:18 -07:00

19 lines
689 B
Diff

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,12 +32,15 @@
IF(NOT IOS_ARCH MATCHES "^(i386|x86_64|armv7.*|arm64.*)$")
MESSAGE(FATAL_ERROR "Unrecognized IOS_ARCH = ${IOS_ARCH}")
ENDIF()
ELSE()
MESSAGE(FATAL_ERROR "CMAKE_SYSTEM_PROCESSOR is not defined")
ENDIF()
+ELSEIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
+ # on macOS, arm64 is called arm64
+ SET(CMAKE_SYSTEM_PROCESSOR "aarch64")
ELSEIF(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "^(i[3-6]86|x86_64|armv[5-8].*|aarch64)$")
MESSAGE(FATAL_ERROR "Unrecognized CMAKE_SYSTEM_PROCESSOR = ${CMAKE_SYSTEM_PROCESSOR}")
ENDIF()
IF(NOT CMAKE_SYSTEM_NAME)
MESSAGE(FATAL_ERROR "CMAKE_SYSTEM_NAME not defined")