Skip to content

Commit 39eacfe

Browse files
committed
cmake fix
1 parent ae8e43d commit 39eacfe

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,10 @@ endif()
121121
message(STATUS "System architecture: ${CMAKE_SYSTEM_PROCESSOR}")
122122

123123
if(${PLATFORM} STREQUAL "osx")
124-
# Set archs to be build for osx to both x86_64 and arm64
125-
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64")
124+
# Default to universal binary if no architecture was specified via -DCMAKE_OSX_ARCHITECTURES
125+
if(NOT DEFINED CMAKE_OSX_ARCHITECTURES OR CMAKE_OSX_ARCHITECTURES STREQUAL "")
126+
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64")
127+
endif()
126128

127129
if(DEFINED CMAKE_OSX_ARCHITECTURES)
128130
message(STATUS "Target architectures (CMAKE_OSX_ARCHITECTURES): ${CMAKE_OSX_ARCHITECTURES}")

0 commit comments

Comments
 (0)