Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions wiki/Building-on-macOS-Sequoia.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# MacOSX 15.5, qt6, gcc 15

## Includes and linker options

Linker and includes have to be set to the main ones from homebrew and the qt ones:

```shell
export LDFLAGS="-L${homebrew_dir}/lib $LDFLAGS"
export CPPFLAGS="-I${homebrew_dir}/include $CPPFLAGS"

# qt
export QT_ROOT=/opt/qt/6.8.2/macos # change to match yours
export LDFLAGS="$LDFLAGS -L$QT_ROOT/lib"
export CPPFLAGS="$CPPFLAGS -I$QT_ROOT/include"

export CXXFLAGS=$CPPFLAGS
```

## Add `qt6` tools to PATH

```shell
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$QT_ROOT/lib/pkgconfig"
export PATH="$QT_ROOT/bin:$PATH"
```

## Customizing `cmake`

Then install two more dependencies.

```shell
brew install ninja googletest # or sudo port install ninja gtest
```

At this point you can run (use `--fresh` if you already have it set up):

```shell
cmake -D CMAKE_INSTALL_PREFIX=/usr \
-D CMAKE_BUILD_TYPE=None \
-D CMAKE_OSX_SYSROOT=$(xcrun --sdk macosx --show-sdk-path) \
-D CMAKE_OSX_DEPLOYMENT_TARGET=10.15 \
-D CMAKE_C_FLAGS="${CFLAGS}" \
-D CMAKE_CXX_FLAGS="${CXXFLAGS}" \
-D INPUTLEAP_BUILD_LIBEI=ON \
-D INPUTLEAP_USE_EXTERNAL_GTEST=ON \
-D INPUTLEAP_BUILD_GULRAK_FILESYSTEM=ON \
-D INPUTLEAP_VERSION_STAGE=Release \
-W no-dev -G Ninja -B build -S .
```

Finally, build with the usual:

```
cmake --build build
```