From d2208d579dacf316f8ae8943d0a64667ced24b9e Mon Sep 17 00:00:00 2001 From: Eduardo Camacho Camacho Date: Fri, 14 Aug 2020 23:06:22 -0700 Subject: [PATCH] Fix build error --- CMakeLists.txt | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b832106d..a359f696 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,19 +54,19 @@ if(APPLE) OUTPUT_STRIP_TRAILING_WHITESPACE) message("-- CMAKE_OSX_SYSROOT ${CMAKE_OSX_SYSROOT}") message("-- IOS_ARCH: ${IOS_ARCH}") - endif() -else() - if(${MAC_ARCH} STREQUAL "x86_64") - set(CMAKE_SYSTEM_PROCESSOR x86_64) - elseif(${MAC_ARCH} STREQUAL "arm64") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch arm64") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch arm64") - set(CMAKE_SYSTEM_PROCESSOR arm64) else() - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch x86_64 -arch arm64") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch x86_64 -arch arm64") + if(${MAC_ARCH} STREQUAL "x86_64") + set(CMAKE_SYSTEM_PROCESSOR x86_64) + elseif(${MAC_ARCH} STREQUAL "arm64") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch arm64") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch arm64") + set(CMAKE_SYSTEM_PROCESSOR arm64) + else() + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch x86_64 -arch arm64") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch x86_64 -arch arm64") + endif() + message("-- MAC_ARCH: ${MAC_ARCH}") endif() - message("-- MAC_ARCH: ${MAC_ARCH}") endif() message("-- CMAKE_SYSTEM_INFO_FILE: ${CMAKE_SYSTEM_INFO_FILE}")