pineapple-src/externals/vcpkg/ports/qnnpack/fix-arm64-osx.patch
2022-07-23 03:01:36 +02:00

18 lines
689 B
Diff
Executable file

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