doc/installation_meson.md
@page installation_meson Meson
@tableofcontents
FTXUI supports Meson as an alternative build system.
# Configure (library only)
meson setup builddir
# Build
ninja -C builddir
# Install
ninja -C builddir install
| Option | Default | Description |
|---|---|---|
examples | false | Build example applications |
tests | false | Build and run tests |
meson setup builddir -Dexamples=true
ninja -C builddir
meson setup builddir -Dtests=true
ninja -C builddir
meson test -C builddir
meson setup builddir -Dexamples=true -Dtests=true
ninja -C builddir
meson test -C builddir
When tests are enabled, FTXUI depends on Google Test (v1.17.0).
The dependency resolution follows the same strategy as the CMake build:
gtest is available via pkg-config or system paths, it will be used directly.subprojects/gtest.wrap file.No manual intervention is required — Meson handles this transparently.
The build produces three libraries:
| Library | Description |
|---|---|
libftxui-screen | Terminal rendering and input |
libftxui-dom | Layout and styling elements |
libftxui-component | Interactive UI components |
Dependencies between them:
component → dom → screen
To use FTXUI in your own Meson project, create a wrap file at subprojects/ftxui.wrap:
[wrap-git]
url = https://github.com/ArthurSonzogni/FTXUI.git
revision = v7.0.0
[provide]
ftxui-screen = ftxui_screen_dep
ftxui-dom = ftxui_dom_dep
ftxui-component = ftxui_component_dep
Then in your meson.build:
ftxui_component_dep = dependency('ftxui-component',
fallback: ['ftxui', 'ftxui_component_dep'],
)
executable('my_app',
'main.cpp',
dependencies: ftxui_component_dep,
)
To change options after initial configuration:
meson configure builddir -Dtests=true
ninja -C builddir
rm -rf builddir
meson setup builddir