Skip to content

Commit

Permalink
Merge pull request #3568 from facebook/readme_cmake_fat
Browse files Browse the repository at this point in the history
Add instructions for building Universal2 on macOS via CMake
  • Loading branch information
Cyan4973 authored Mar 28, 2023
2 parents 93da041 + c36d54f commit abb3585
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
sudo ninja install
```

### Meson

A Meson project is provided within [`build/meson`](build/meson). Follow
Expand Down

0 comments on commit abb3585

Please sign in to comment.