From 82cf6037ac28042f82bc0bc44188f51177126b43 Mon Sep 17 00:00:00 2001 From: Rick Mark Date: Wed, 22 Mar 2023 11:28:03 -0700 Subject: [PATCH 1/3] Add instructions for building Universal2 on macOS via CMake --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 6bcf757d8..8380293c3 100644 --- a/README.md +++ b/README.md @@ -154,6 +154,18 @@ to create `zstd` binary, and `libzstd` dynamic and static libraries. By default, `CMAKE_BUILD_TYPE` is set to `Release`. +#### Support for Fat (Universal2) Output + +`zstd` can be built and installed with support for both Apple Silicon (M1/M2) as well as Intel by using CMake's Universal2 support. +To perform a Fat/Universal2 build and install use the following commands: + +```bash +cmake -B build-cmake-debug -S build/cmake -G Ninja -DCMAKE_OSX_ARCHITECTURES="x86_64;x86_64h;arm64;arm64e" +cd build-cmake-debug +ninja build +sudo ninja install +``` + ### Meson A Meson project is provided within [`build/meson`](build/meson). Follow From 408bd1e9fe8c7dc52b45b3879b0c03d034f51bec Mon Sep 17 00:00:00 2001 From: Rick Mark Date: Wed, 22 Mar 2023 11:28:03 -0700 Subject: [PATCH 2/3] Add instructions for building Universal2 on macOS via CMake --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 6bcf757d8..c8b7521d8 100644 --- a/README.md +++ b/README.md @@ -154,6 +154,18 @@ to create `zstd` binary, and `libzstd` dynamic and static libraries. By default, `CMAKE_BUILD_TYPE` is set to `Release`. +#### Support for Fat (Universal2) Output + +`zstd` can be built and installed with support for both Apple Silicon (M1/M2) as well as Intel by using CMake's Universal2 support. +To perform a Fat/Universal2 build and install use the following commands: + +```bash +cmake -B build-cmake-debug -S build/cmake -G Ninja -DCMAKE_OSX_ARCHITECTURES="x86_64;x86_64h;arm64" +cd build-cmake-debug +ninja build +sudo ninja install +``` + ### Meson A Meson project is provided within [`build/meson`](build/meson). Follow From c36d54f5ed74da651a4bcbbb3bc7128551339f76 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Mon, 27 Mar 2023 09:09:22 -0700 Subject: [PATCH 3/3] Update README.md fix minor doc mistake (`ninja build` doesn't work) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c8b7521d8..9a9202adc 100644 --- a/README.md +++ b/README.md @@ -162,7 +162,7 @@ To perform a Fat/Universal2 build and install use the following commands: ```bash cmake -B build-cmake-debug -S build/cmake -G Ninja -DCMAKE_OSX_ARCHITECTURES="x86_64;x86_64h;arm64" cd build-cmake-debug -ninja build +ninja sudo ninja install ```