Skip to content
You are viewing documentation for v6.1.4. Switch to latest (main).

Package Managers ​

Install FTXUI via vcpkg, Conan, xmake, or Nix.

vcpkg ​

FTXUI is available in the vcpkg registry.

json
{
  "name": "your-project",
  "version-string": "0.1.0",
  "dependencies": [
    {
      "name": "ftxui",
      "version>=": "7.0.3"
    }
  ]
}
cmake
cmake_minimum_required(VERSION 3.15)
project(my_project)

find_package(ftxui CONFIG REQUIRED)

add_executable(main main.cpp)
target_link_libraries(main
  PRIVATE ftxui::screen
  PRIVATE ftxui::dom
  PRIVATE ftxui::component
)
bash
vcpkg install --triplet x64-linux # or x64-windows / arm64-osx
cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake
cmake --build build

Conan ​

FTXUI is published on Conan Center on every release.

ini
[requires]
ftxui/7.0.3

[generators]
CMakeDeps
CMakeToolchain

[layout]
cmake_layout
cmake
cmake_minimum_required(VERSION 3.20)
project(ftxui-demo)
set(CMAKE_CXX_STANDARD 17)

find_package(ftxui CONFIG REQUIRED)

add_executable(demo demo.cpp)
target_link_libraries(demo PRIVATE ftxui::component)
bash
conan install . --output-folder=build --build=missing
cmake --preset conan-release
cmake --build --preset conan-release

Offline / Local Conan Build

If Conan Center is unreachable, build from a local checkout using the root conanfile.py:

bash
git clone https://github.com/ArthurSonzogni/FTXUI && cd FTXUI
git checkout v7.0.3
conan create . --build=missing

xmake ​

Community Package

FTXUI is maintained by the community in xmake-repo.

lua
add_requires("ftxui", {system = false})

target("demo")
    set_kind("binary")
    add_files("src/*.cpp")
    add_packages("ftxui")

Nix Flake ​

FTXUI ships with a flake.nix providing both packages and a development shell.

bash
nix build github:ArthurSonzogni/FTXUI
nix
{
  inputs.ftxui.url = "github:ArthurSonzogni/FTXUI";
}

Reference ftxui.packages.<system>.ftxui in your flake outputs.