From 4ed23a2cfb27f1107e0f2400c69bb7d086c79279 Mon Sep 17 00:00:00 2001 From: Mikhail Komarov Date: Thu, 4 Aug 2022 16:47:07 +0300 Subject: [PATCH] Architecture detection fixes. --- cmake/TargetArchitecture.cmake | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cmake/TargetArchitecture.cmake b/cmake/TargetArchitecture.cmake index 442322a..b1d2174 100644 --- a/cmake/TargetArchitecture.cmake +++ b/cmake/TargetArchitecture.cmake @@ -1,10 +1,4 @@ -#---------------------------------------------------------------------------# -# Copyright (c) 2018-2020 Mikhail Komarov -# -# Distributed under the Boost Software License, Version 1.0 -# See accompanying file LICENSE_1_0.txt or copy at -# http://www.boost.org/LICENSE_1_0.txt -#---------------------------------------------------------------------------# + # https://qt.gitorious.org/qt/qtbase/blobs/master/src/corelib/global/qprocessordetection.h # Currently handles arm (v5, v6, v7), x86 (32/64), ia64, and ppc (32/64) @@ -107,6 +101,8 @@ function(target_architecture OUTPUT_ARCHITECTURE) set(osx_arch_i386 TRUE) elseif("${osx_arch}" STREQUAL "x86_64") set(osx_arch_x86_64 TRUE) + elseif("${osx_arch}" STREQUAL "arm64") + set(osx_arch_arm64 TRUE) elseif("${osx_arch}" STREQUAL "ppc64" AND ppc_support) set(osx_arch_ppc64 TRUE) else() @@ -130,6 +126,10 @@ function(target_architecture OUTPUT_ARCHITECTURE) if(osx_arch_ppc64) list(APPEND ARCH ppc64) endif() + + if(osx_arch_ppc64) + list(APPEND ARCH arm64) + endif() else() file(WRITE "${CMAKE_BINARY_DIR}/arch.c" "${archdetect_c_code}")