From 155231a4408c20c66a88a705d0e21997eabd1e35 Mon Sep 17 00:00:00 2001 From: drewcassidy Date: Fri, 5 Feb 2021 23:35:06 -0800 Subject: [PATCH] Only do fat binaries on apple clang --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cbaab56..161bbb2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,4 +30,7 @@ target_compile_features(python_rgbcx PUBLIC cxx_std_20 c_std_11) target_compile_features(test_rgbcx PUBLIC cxx_std_20 c_std_11) set_property(TARGET python_rgbcx test_rgbcx PROPERTY INTERPROCEDURAL_OPTIMIZATION True) #enable FLTO if available -set_property(TARGET python_rgbcx test_rgbcx PROPERTY OSX_ARCHITECTURES_RELEASE x86_64 arm64) #Mach-O fat binary for arm and x86 + +if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set_property(TARGET python_rgbcx test_rgbcx PROPERTY OSX_ARCHITECTURES_RELEASE x86_64 arm64) #Mach-O fat binary for arm and x86 +endif ()