From 292e96cdfd8e78a26a4b82547419f00227f7a5f4 Mon Sep 17 00:00:00 2001 From: Mentalflow <312902918@qq.com> Date: Thu, 4 May 2023 00:22:20 +0800 Subject: [PATCH] Make the library compile as Universal Library in macOS. --- CMakeLists.txt | 6 ++++++ example/CMakeLists.txt | 5 +++++ src/CMakeLists.txt | 6 ++++++ 3 files changed, 17 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 038a2bf..3115d16 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,10 @@ cmake_minimum_required(VERSION 3.16) + +if(APPLE) +#配置通用编译 +set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64" CACHE STRING "" FORCE) +endif() + project(FluentUI VERSION 0.1 LANGUAGES CXX) add_subdirectory(src) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 0cfcf11..f8b04fd 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -1,5 +1,10 @@ cmake_minimum_required(VERSION 3.16) +if(APPLE) +#配置通用编译 +set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64" CACHE STRING "" FORCE) +endif() + project(example VERSION 0.1 LANGUAGES CXX) set(CMAKE_AUTOMOC ON) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4cd0e66..c8d169b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,10 @@ cmake_minimum_required(VERSION 3.16) + +if(APPLE) +#配置通用编译 +set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64" CACHE STRING "" FORCE) +endif() + project(fluentui LANGUAGES CXX) set(CMAKE_AUTOMOC ON)