Skip to content

Commit

Permalink
update README with hints for macOS
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Müller <[email protected]>
  • Loading branch information
marcelmbn committed Sep 17, 2024
1 parent c403cd1 commit 5dcbcfe
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,27 @@ meson setup build --buildtype release --optimization 2 -Dfortran_link_args="-qop
ninja -C build test
```

> [!IMPORTANT]
> Compilation with `meson` on macOS differs from the protocol for Linux-based systems:
<details>
<summary><b>Setting up meson on macOS</b></summary>

#### Compiling with meson on macOS

1. **Use Homebrew for Package Management**: Install dependencies like `gcc`, `gfortran`, and `openblas` using Homebrew.
[Further information](https://brew.sh/) on how to setup `brew`.
Example:
```bash
brew install gcc gfortran openblas
```
2. **meson setup call with appropriate environment variables**: Use the following adapted `meson setup` call to compile `xtb` on macOS. Obviously, the paths to the libraries might differ on your system.
```bash
LDFLAGS="-L/opt/homebrew/opt/openblas/lib" CPPFLAGS="-I/opt/homebrew/opt/openblas/include" FC=gfortran-14 CC=gcc-14 meson setup _build --buildtype release -Dlapack=openblas
```
</details>
<br>

Make sure the testsuite is running without errors.

To install the `xtb` binaries to `/usr/local` use (might require `sudo`)
Expand Down

0 comments on commit 5dcbcfe

Please sign in to comment.