Skip to content

Commit

Permalink
Apple Silicon (arm64) support for macOS builds
Browse files Browse the repository at this point in the history
- Build Universal 2 binaries (x86_64+arm64) by default instead of i386+x86_64.
- Build a macOS framework by default, as this is the most common way to consume the library on the platform.
  • Loading branch information
renaudguerin committed Feb 7, 2021
1 parent 549b195 commit 394b590
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ set(MINOR_VERSION 1)
option(BUILD_SHARED_LIBS "Build a dynamic library instead of static library" ON)

if (APPLE)
option(BUILD_FRAMEWORK "Build a Mac OS X framework instead of a shared library" OFF)
set(CMAKE_OSX_ARCHITECTURES "i386;x86_64")
option(BUILD_FRAMEWORK "Build a macOS framework instead of a shared library" ON)
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64")
set(BUILD_SHARED_LIBS ON)
endif()

Expand Down

0 comments on commit 394b590

Please sign in to comment.