FTXUI 6.1.9
C++ functional terminal UI.
|
This page explains how to depend on FTXUI using CMake.
This approach downloads FTXUI at configure time and doesn't require a system-wide install.
This ensures reproducible builds and easy dependency management.
If FTXUI is installed system-wide or via a package manager (e.g. vcpkg or Conan), you can use:
Make sure the package is visible in your CMAKE_PREFIX_PATH
.
You can also add FTXUI as a Git submodule, keeping it as part of your repository:
When cloning a repository that already includes FTXUI as a submodule, make sure to fetch submodules with:
Then in your CMakeLists.txt
:
This approach works well if you want to vendor FTXUI in your own repository.
FTXUI supports the following CMake options:
Option | Description | Default |
---|---|---|
FTXUI_BUILD_EXAMPLES | Build bundled examples | OFF |
FTXUI_BUILD_DOCS | Build the documentation | OFF |
FTXUI_BUILD_TESTS | Enable tests | OFF |
FTXUI_ENABLE_INSTALL | Generate install targets | ON |
FTXUI_MICROSOFT_TERMINAL_FALLBACK | Improve Windows compatibility | ON/OFF |
To enable an option:
To confirm the setup is working, build and run a minimal example. If you need a complete template, see: ftxui-starter