diff --git a/README.md b/README.md index e7d8f319..8bcaee97 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ A simple cross-platform C++ library for terminal based user interfaces! * No dependencies * **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. + * Multiple packages: CMake [FetchContent]([https://bewagner.net/programming/2020/05/02/cmake-fetchcontent/](https://cmake.org/cmake/help/latest/module/FetchContent.html)) (preferred),Bazel, vcpkg, pkgbuild, conan. * Good practices: documentation, tests, fuzzers, performance tests, automated CI, automated packaging, etc... ## Documentation @@ -383,6 +383,7 @@ endif() ``` If you don't, FTXUI may be used from the following packages: +- [bazel](...) - [vcpkg](https://vcpkgx.com/details.html?package=ftxui) - [Arch Linux PKGBUILD](https://aur.archlinux.org/packages/ftxui-git/). - [conan.io](https://conan.io/center/ftxui) @@ -395,8 +396,6 @@ If you choose to build and link FTXUI yourself, `ftxui-component` must be first g++ . . . -lftxui-component -lftxui-dom -lftxui-screen . . . ``` - - ## Contributors diff --git a/bazel/ftxui.bzl b/bazel/ftxui.bzl index 0c2e5fc8..0a42a7f5 100644 --- a/bazel/ftxui.bzl +++ b/bazel/ftxui.bzl @@ -8,6 +8,12 @@ def ftxui_cc_library( hdrs, linkopts = [], deps = []): + + cpp20 = select({ + "@bazel_tools//tools/cpp:msvc": ["/std:c++20"], + "//conditions:default": ["-std=c++20"], + }) + cc_library( name = name, srcs = srcs, @@ -20,7 +26,7 @@ def ftxui_cc_library( "include", "src", ], - copts = ["-std=c++20"], + copts = cpp20, visibility = ["//visibility:public"], )