Make modules opt-in (for pre-C++20 builds not to break)

This commit is contained in:
Toyosatomimi no Miko
2025-03-28 08:28:05 -04:00
parent 1c37cdd192
commit e57c275512
2 changed files with 13 additions and 5 deletions

View File

@@ -40,6 +40,7 @@ A simple cross-platform C++ library for terminal based user interfaces!
* Support for animations. [Demo 1](https://arthursonzogni.github.io/FTXUI/examples/?file=component/menu_underline_animated_gallery), [Demo 2](https://arthursonzogni.github.io/FTXUI/examples/?file=component/button_style)
* Support for drawing. [Demo](https://arthursonzogni.github.io/FTXUI/examples/?file=component/canvas_animated)
* No dependencies
* Module support
* **Cross platform**: Linux/MacOS (main target), WebAssembly, Windows (Thanks to contributors!).
* Learn by [examples](#documentation), and [tutorials](#documentation)
* Multiple packages: CMake [FetchContent]([https://bewagner.net/programming/2020/05/02/cmake-fetchcontent/](https://cmake.org/cmake/help/latest/module/FetchContent.html)) (preferred), vcpkg, pkgbuild, conan.
@@ -396,6 +397,7 @@ If you choose to build and link FTXUI yourself, `ftxui-component` must be first
g++ . . . -lftxui-component -lftxui-dom -lftxui-screen . . .
```
To build FTXUI with modules, ensure that you are using a generator like Ninja or Visual Studio that supports modules, and pass the flag `FTXUI_BUILD_MODULES`.
## Contributors