Skip to content

Commit

Permalink
fix: build static fmt too, otherwise we need to append rpaths
Browse files Browse the repository at this point in the history
  • Loading branch information
c-dilks committed Jan 12, 2024
1 parent 25a522e commit 2bb5310
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions doc/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ python -m pip install meson ninja
### :large_orange_diamond: `fmt`: C++ output formatting library
<https://github.com/fmtlib/fmt>
- 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
```
Expand Down

0 comments on commit 2bb5310

Please sign in to comment.