2021-06-26 00:08:21 +02:00
|
|
|
cmake_minimum_required(VERSION 3.11)
|
2020-08-09 14:53:56 +02:00
|
|
|
|
2021-06-26 15:14:27 +02:00
|
|
|
include(cmake/ftxui_git_version.cmake)
|
2020-08-09 14:53:56 +02:00
|
|
|
|
2019-01-06 18:53:02 +01:00
|
|
|
project(ftxui
|
|
|
|
|
LANGUAGES CXX
|
2021-08-08 23:25:20 +02:00
|
|
|
VERSION 0.8.${git_version}
|
2019-01-06 18:53:02 +01:00
|
|
|
)
|
2019-01-03 00:35:59 +01:00
|
|
|
|
2021-06-17 23:07:26 +02:00
|
|
|
option(FTXUI_BUILD_DOCS "Set to ON to build tests" ON)
|
2020-02-11 14:04:23 +01:00
|
|
|
option(FTXUI_BUILD_EXAMPLES "Set to ON to build examples" ON)
|
2020-04-16 23:20:04 +02:00
|
|
|
option(FTXUI_BUILD_TESTS "Set to ON to build tests" OFF)
|
2021-06-17 23:07:26 +02:00
|
|
|
option(FTXUI_BUILD_TESTS_FUZZER "Set to ON to enable fuzzing" OFF)
|
|
|
|
|
option(FTXUI_ENABLE_INSTALL "Generate the install target" ON)
|
2018-09-18 08:48:40 +02:00
|
|
|
|
2021-07-04 17:38:31 +02:00
|
|
|
set(FTXUI_MICROSOFT_TERMINAL_FALLBACK_HELP_TEXT "On windows, assume the \
|
|
|
|
|
terminal used will be one of Microsoft and use a set of reasonnable fallback \
|
|
|
|
|
to counteract its implementations problems.")
|
|
|
|
|
if (WIN32)
|
|
|
|
|
option(FTXUI_MICROSOFT_TERMINAL_FALLBACK
|
|
|
|
|
${FTXUI_MICROSOFT_TERMINAL_FALLBACK_HELP_TEXT} ON)
|
|
|
|
|
else()
|
|
|
|
|
option(FTXUI_MICROSOFT_TERMINAL_FALLBACK
|
|
|
|
|
${FTXUI_MICROSOFT_TERMINAL_FALLBACK_HELP_TEXT} OFF)
|
|
|
|
|
endif()
|
|
|
|
|
|
2021-05-16 11:59:20 +02:00
|
|
|
add_library(screen STATIC
|
2019-02-02 01:59:48 +01:00
|
|
|
src/ftxui/screen/box.cpp
|
2020-09-02 11:32:22 +02:00
|
|
|
src/ftxui/screen/color.cpp
|
2020-09-06 13:43:24 +02:00
|
|
|
src/ftxui/screen/color_info.cpp
|
2019-02-02 01:59:48 +01:00
|
|
|
src/ftxui/screen/screen.cpp
|
|
|
|
|
src/ftxui/screen/string.cpp
|
|
|
|
|
src/ftxui/screen/terminal.cpp
|
2020-03-24 23:26:55 +01:00
|
|
|
include/ftxui/screen/box.hpp
|
|
|
|
|
include/ftxui/screen/color.hpp
|
2020-09-06 13:43:24 +02:00
|
|
|
include/ftxui/screen/color_info.hpp
|
2020-03-24 23:26:55 +01:00
|
|
|
include/ftxui/screen/screen.hpp
|
|
|
|
|
include/ftxui/screen/string.hpp
|
2019-02-02 01:59:48 +01:00
|
|
|
)
|
|
|
|
|
|
2021-05-16 11:59:20 +02:00
|
|
|
add_library(dom STATIC
|
2020-03-24 23:26:55 +01:00
|
|
|
include/ftxui/dom/elements.hpp
|
|
|
|
|
include/ftxui/dom/node.hpp
|
|
|
|
|
include/ftxui/dom/requirement.hpp
|
|
|
|
|
include/ftxui/dom/take_any_args.hpp
|
2019-02-02 01:59:48 +01:00
|
|
|
src/ftxui/dom/blink.cpp
|
|
|
|
|
src/ftxui/dom/bold.cpp
|
|
|
|
|
src/ftxui/dom/border.cpp
|
2021-08-10 22:15:24 +02:00
|
|
|
src/ftxui/dom/box_helper.cpp
|
|
|
|
|
src/ftxui/dom/box_helper.hpp
|
2020-08-26 17:58:18 +02:00
|
|
|
src/ftxui/dom/clear_under.cpp
|
2019-02-02 01:59:48 +01:00
|
|
|
src/ftxui/dom/color.cpp
|
|
|
|
|
src/ftxui/dom/composite_decorator.cpp
|
|
|
|
|
src/ftxui/dom/dbox.cpp
|
|
|
|
|
src/ftxui/dom/dim.cpp
|
|
|
|
|
src/ftxui/dom/flex.cpp
|
|
|
|
|
src/ftxui/dom/frame.cpp
|
|
|
|
|
src/ftxui/dom/gauge.cpp
|
|
|
|
|
src/ftxui/dom/graph.cpp
|
|
|
|
|
src/ftxui/dom/hbox.cpp
|
2021-08-22 19:36:11 +02:00
|
|
|
src/ftxui/dom/gridbox.cpp
|
2019-02-02 01:59:48 +01:00
|
|
|
src/ftxui/dom/hflow.cpp
|
|
|
|
|
src/ftxui/dom/inverted.cpp
|
|
|
|
|
src/ftxui/dom/node.cpp
|
|
|
|
|
src/ftxui/dom/node_decorator.cpp
|
|
|
|
|
src/ftxui/dom/paragraph.cpp
|
2021-04-18 22:33:41 +02:00
|
|
|
src/ftxui/dom/reflect.cpp
|
2019-02-02 01:59:48 +01:00
|
|
|
src/ftxui/dom/separator.cpp
|
|
|
|
|
src/ftxui/dom/size.cpp
|
|
|
|
|
src/ftxui/dom/spinner.cpp
|
|
|
|
|
src/ftxui/dom/text.cpp
|
|
|
|
|
src/ftxui/dom/underlined.cpp
|
|
|
|
|
src/ftxui/dom/util.cpp
|
|
|
|
|
src/ftxui/dom/vbox.cpp
|
|
|
|
|
)
|
|
|
|
|
|
2021-05-16 11:59:20 +02:00
|
|
|
add_library(component STATIC
|
2021-05-01 18:13:56 +02:00
|
|
|
include/ftxui/component/captured_mouse.hpp
|
2020-08-26 16:26:09 +02:00
|
|
|
include/ftxui/component/component.hpp
|
2021-05-09 20:32:27 +02:00
|
|
|
include/ftxui/component/component_base.hpp
|
2020-08-26 16:26:09 +02:00
|
|
|
include/ftxui/component/event.hpp
|
2021-04-25 15:22:38 +02:00
|
|
|
include/ftxui/component/mouse.hpp
|
2020-08-26 16:26:09 +02:00
|
|
|
include/ftxui/component/receiver.hpp
|
|
|
|
|
include/ftxui/component/screen_interactive.hpp
|
|
|
|
|
src/ftxui/component/button.cpp
|
2021-05-23 12:53:20 +02:00
|
|
|
src/ftxui/component/catch_event.cpp
|
2019-02-02 01:59:48 +01:00
|
|
|
src/ftxui/component/checkbox.cpp
|
|
|
|
|
src/ftxui/component/component.cpp
|
|
|
|
|
src/ftxui/component/container.cpp
|
|
|
|
|
src/ftxui/component/event.cpp
|
|
|
|
|
src/ftxui/component/input.cpp
|
|
|
|
|
src/ftxui/component/menu.cpp
|
|
|
|
|
src/ftxui/component/radiobox.cpp
|
2020-03-26 23:15:52 +01:00
|
|
|
src/ftxui/component/radiobox.cpp
|
2021-05-13 11:44:47 +02:00
|
|
|
src/ftxui/component/renderer.cpp
|
2021-05-27 15:22:53 +02:00
|
|
|
src/ftxui/component/resizable_split.cpp
|
2019-02-02 01:59:48 +01:00
|
|
|
src/ftxui/component/screen_interactive.cpp
|
2021-04-29 00:18:58 +02:00
|
|
|
src/ftxui/component/slider.cpp
|
2020-10-25 01:57:56 +02:00
|
|
|
src/ftxui/component/terminal_input_parser.cpp
|
|
|
|
|
src/ftxui/component/terminal_input_parser.hpp
|
2021-04-29 00:18:58 +02:00
|
|
|
src/ftxui/component/toggle.cpp
|
2019-02-02 01:59:48 +01:00
|
|
|
)
|
|
|
|
|
|
2021-06-26 15:14:27 +02:00
|
|
|
target_link_libraries(dom
|
|
|
|
|
PUBLIC screen
|
|
|
|
|
)
|
2020-03-21 16:13:14 +01:00
|
|
|
|
2021-06-26 15:14:27 +02:00
|
|
|
find_package(Threads)
|
|
|
|
|
target_link_libraries(component
|
|
|
|
|
PUBLIC dom
|
|
|
|
|
PRIVATE Threads::Threads
|
|
|
|
|
)
|
2020-03-25 01:38:50 +01:00
|
|
|
|
2021-06-26 15:14:27 +02:00
|
|
|
include(cmake/ftxui_set_options.cmake)
|
|
|
|
|
ftxui_set_options(screen)
|
|
|
|
|
ftxui_set_options(dom)
|
|
|
|
|
ftxui_set_options(component)
|
2019-02-02 01:59:48 +01:00
|
|
|
|
2021-06-26 15:14:27 +02:00
|
|
|
if (FTXUI_BUILD_TESTS AND ${CMAKE_VERSION} VERSION_GREATER "3.11.4")
|
|
|
|
|
include(cmake/ftxui_test.cmake)
|
2021-03-21 22:54:39 +01:00
|
|
|
endif()
|
|
|
|
|
|
2020-02-11 14:04:23 +01:00
|
|
|
if(FTXUI_ENABLE_INSTALL)
|
2021-06-26 15:14:27 +02:00
|
|
|
include(cmake/ftxui_install.cmake)
|
2019-02-02 01:59:48 +01:00
|
|
|
endif()
|
|
|
|
|
|
2020-02-11 14:04:23 +01:00
|
|
|
if(FTXUI_BUILD_EXAMPLES)
|
|
|
|
|
add_subdirectory(examples)
|
|
|
|
|
endif()
|
2020-05-25 01:34:13 +02:00
|
|
|
|
|
|
|
|
if(FTXUI_BUILD_DOCS)
|
|
|
|
|
add_subdirectory(doc)
|
|
|
|
|
endif()
|
2021-06-26 15:14:27 +02:00
|
|
|
|
|
|
|
|
include(cmake/iwyu.cmake)
|
|
|
|
|
include(cmake/ftxui_export.cmake)
|