diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a8ddda3d..465dfb08 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,7 +58,7 @@ jobs: ref: ${{ env.fmt_version }} - name: build run: | - cmake -S . -B build -DCMAKE_INSTALL_PREFIX=fmt -DBUILD_SHARED_LIBS=TRUE + cmake -S . -B build -DCMAKE_INSTALL_PREFIX=fmt -DBUILD_SHARED_LIBS=TRUE -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE cmake --build build -j2 cmake --install build - run: brew install tree diff --git a/doc/setup.md b/doc/setup.md index d68f7d24..87e5115b 100644 --- a/doc/setup.md +++ b/doc/setup.md @@ -27,10 +27,10 @@ python -m pip install meson ninja ### :large_orange_diamond: `fmt`: C++ output formatting library - likely available in your package manager, likely as `fmt` or `libfmt` -- if you compile it yourself, include the `cmake` option `-DBUILD_SHARED_LIBS=TRUE` +- if you compile it yourself, include the `cmake` options `-DBUILD_SHARED_LIBS=TRUE` and `-DCMAKE_POSITION_INDEPENDENT_CODE=TRUE` - example `cmake` commands: ```bash -cmake -S /path/to/fmt_source_code -B build-fmt -DCMAKE_INSTALL_PREFIX=/path/to/fmt_installation -DBUILD_SHARED_LIBS=TRUE +cmake -S /path/to/fmt_source_code -B build-fmt -DCMAKE_INSTALL_PREFIX=/path/to/fmt_installation -DBUILD_SHARED_LIBS=TRUE -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE cmake --build build-fmt -j$(nproc) cmake --install build-fmt ```