]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Add instructions for building Universal2 on macOS via CMake
authorRick Mark <rickmark@meta.com>
Wed, 22 Mar 2023 18:28:03 +0000 (11:28 -0700)
committerRick Mark <rickmark@meta.com>
Wed, 22 Mar 2023 18:28:03 +0000 (11:28 -0700)
README.md

index 6bcf757d862f7ae221a6c06f4c978257d566a39d..8380293c353395791bc7e5b697f1c4ea26a1353d 100644 (file)
--- 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