From b7e8a87b814b015f8e2ef6fc4c089f7462a7f39b Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 9 Aug 2020 15:22:04 +0300 Subject: [PATCH] - fixed platform detection of Apple ARM64 target --- cmake/TargetArch.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmake/TargetArch.cmake b/cmake/TargetArch.cmake index 198aa9c052..2cfef741b7 100644 --- a/cmake/TargetArch.cmake +++ b/cmake/TargetArch.cmake @@ -96,6 +96,8 @@ function(target_architecture output_var) set(osx_arch_x86_64 TRUE) elseif("${osx_arch}" STREQUAL "ppc64" AND ppc_support) set(osx_arch_ppc64 TRUE) + elseif("${osx_arch}" STREQUAL "arm64") + set(osx_arch_arm64 TRUE) else() message(FATAL_ERROR "Invalid OS X arch name: ${osx_arch}") endif() @@ -117,6 +119,10 @@ function(target_architecture output_var) if(osx_arch_ppc64) list(APPEND ARCH ppc64) endif() + + if(osx_arch_arm64) + list(APPEND ARCH arm64) + endif() else() file(WRITE "${CMAKE_BINARY_DIR}/arch.c" "${archdetect_c_code}")