2021-06-26 06:08:21 +08:00
|
|
|
cmake_minimum_required(VERSION 3.11)
|
2020-08-09 20:53:56 +08:00
|
|
|
|
2019-01-07 01:53:02 +08:00
|
|
|
project(ftxui
|
|
|
|
LANGUAGES CXX
|
2022-01-23 00:58:33 +08:00
|
|
|
VERSION 2.0.0
|
2019-01-07 01:53:02 +08:00
|
|
|
)
|
2019-01-03 07:35:59 +08:00
|
|
|
|
2021-11-09 19:11:45 +08:00
|
|
|
option(FTXUI_BUILD_DOCS "Set to ON to build docs" ON)
|
2020-02-11 21:04:23 +08:00
|
|
|
option(FTXUI_BUILD_EXAMPLES "Set to ON to build examples" ON)
|
2020-04-17 05:20:04 +08:00
|
|
|
option(FTXUI_BUILD_TESTS "Set to ON to build tests" OFF)
|
2021-06-18 05:07:26 +08: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 14:48:40 +08:00
|
|
|
|
2021-07-04 23:38:31 +08: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-10-10 18:52:34 +08:00
|
|
|
add_library(screen
|
2022-01-13 08:46:09 +08:00
|
|
|
include/ftxui/screen/box.hpp
|
|
|
|
include/ftxui/screen/color.hpp
|
|
|
|
include/ftxui/screen/color_info.hpp
|
|
|
|
include/ftxui/screen/screen.hpp
|
|
|
|
include/ftxui/screen/string.hpp
|
2019-02-02 08:59:48 +08:00
|
|
|
src/ftxui/screen/box.cpp
|
2020-09-02 17:32:22 +08:00
|
|
|
src/ftxui/screen/color.cpp
|
2020-09-06 19:43:24 +08:00
|
|
|
src/ftxui/screen/color_info.cpp
|
2019-02-02 08:59:48 +08:00
|
|
|
src/ftxui/screen/screen.cpp
|
|
|
|
src/ftxui/screen/string.cpp
|
|
|
|
src/ftxui/screen/terminal.cpp
|
2022-01-13 08:46:09 +08:00
|
|
|
src/ftxui/screen/util.hpp
|
2019-02-02 08:59:48 +08:00
|
|
|
)
|
|
|
|
|
2021-10-10 18:52:34 +08:00
|
|
|
add_library(dom
|
2021-12-23 21:17:33 +08:00
|
|
|
include/ftxui/dom/canvas.hpp
|
2020-03-25 06:26:55 +08:00
|
|
|
include/ftxui/dom/elements.hpp
|
2021-12-12 00:58:25 +08:00
|
|
|
include/ftxui/dom/flexbox_config.hpp
|
2020-03-25 06:26:55 +08:00
|
|
|
include/ftxui/dom/node.hpp
|
|
|
|
include/ftxui/dom/requirement.hpp
|
|
|
|
include/ftxui/dom/take_any_args.hpp
|
2019-02-02 08:59:48 +08:00
|
|
|
src/ftxui/dom/blink.cpp
|
|
|
|
src/ftxui/dom/bold.cpp
|
|
|
|
src/ftxui/dom/border.cpp
|
2021-08-11 04:15:24 +08:00
|
|
|
src/ftxui/dom/box_helper.cpp
|
|
|
|
src/ftxui/dom/box_helper.hpp
|
2021-12-23 21:17:33 +08:00
|
|
|
src/ftxui/dom/canvas.cpp
|
2020-08-26 23:58:18 +08:00
|
|
|
src/ftxui/dom/clear_under.cpp
|
2019-02-02 08:59:48 +08: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
|
2021-12-12 00:58:25 +08:00
|
|
|
src/ftxui/dom/flexbox.cpp
|
|
|
|
src/ftxui/dom/flexbox_config.cpp
|
|
|
|
src/ftxui/dom/flexbox_helper.cpp
|
|
|
|
src/ftxui/dom/flexbox_helper.hpp
|
2021-12-13 18:38:31 +08:00
|
|
|
src/ftxui/dom/focus.cpp
|
2019-02-02 08:59:48 +08:00
|
|
|
src/ftxui/dom/frame.cpp
|
|
|
|
src/ftxui/dom/gauge.cpp
|
|
|
|
src/ftxui/dom/graph.cpp
|
2021-08-23 01:36:11 +08:00
|
|
|
src/ftxui/dom/gridbox.cpp
|
2021-09-26 21:19:17 +08:00
|
|
|
src/ftxui/dom/hbox.cpp
|
2019-02-02 08:59:48 +08:00
|
|
|
src/ftxui/dom/inverted.cpp
|
|
|
|
src/ftxui/dom/node.cpp
|
|
|
|
src/ftxui/dom/node_decorator.cpp
|
|
|
|
src/ftxui/dom/paragraph.cpp
|
2021-04-19 04:33:41 +08:00
|
|
|
src/ftxui/dom/reflect.cpp
|
2021-09-26 21:19:17 +08:00
|
|
|
src/ftxui/dom/scroll_indicator.cpp
|
2019-02-02 08:59:48 +08:00
|
|
|
src/ftxui/dom/separator.cpp
|
|
|
|
src/ftxui/dom/size.cpp
|
|
|
|
src/ftxui/dom/spinner.cpp
|
2021-10-16 05:04:11 +08:00
|
|
|
src/ftxui/dom/table.cpp
|
2019-02-02 08:59:48 +08:00
|
|
|
src/ftxui/dom/text.cpp
|
|
|
|
src/ftxui/dom/underlined.cpp
|
|
|
|
src/ftxui/dom/util.cpp
|
|
|
|
src/ftxui/dom/vbox.cpp
|
|
|
|
)
|
|
|
|
|
2021-10-10 18:52:34 +08:00
|
|
|
add_library(component
|
2021-05-02 00:13:56 +08:00
|
|
|
include/ftxui/component/captured_mouse.hpp
|
2020-08-26 22:26:09 +08:00
|
|
|
include/ftxui/component/component.hpp
|
2021-05-10 02:32:27 +08:00
|
|
|
include/ftxui/component/component_base.hpp
|
2020-08-26 22:26:09 +08:00
|
|
|
include/ftxui/component/event.hpp
|
2021-04-25 21:22:38 +08:00
|
|
|
include/ftxui/component/mouse.hpp
|
2020-08-26 22:26:09 +08:00
|
|
|
include/ftxui/component/receiver.hpp
|
|
|
|
include/ftxui/component/screen_interactive.hpp
|
|
|
|
src/ftxui/component/button.cpp
|
2021-05-23 18:53:20 +08:00
|
|
|
src/ftxui/component/catch_event.cpp
|
2019-02-02 08:59:48 +08:00
|
|
|
src/ftxui/component/checkbox.cpp
|
2022-01-02 22:48:56 +08:00
|
|
|
src/ftxui/component/collapsible.cpp
|
2019-02-02 08:59:48 +08:00
|
|
|
src/ftxui/component/component.cpp
|
|
|
|
src/ftxui/component/container.cpp
|
2021-09-26 21:19:17 +08:00
|
|
|
src/ftxui/component/dropdown.cpp
|
2019-02-02 08:59:48 +08:00
|
|
|
src/ftxui/component/event.cpp
|
|
|
|
src/ftxui/component/input.cpp
|
2021-09-26 21:19:17 +08:00
|
|
|
src/ftxui/component/maybe.cpp
|
2019-02-02 08:59:48 +08:00
|
|
|
src/ftxui/component/menu.cpp
|
|
|
|
src/ftxui/component/radiobox.cpp
|
2020-03-27 06:15:52 +08:00
|
|
|
src/ftxui/component/radiobox.cpp
|
2021-05-13 17:44:47 +08:00
|
|
|
src/ftxui/component/renderer.cpp
|
2021-05-27 21:22:53 +08:00
|
|
|
src/ftxui/component/resizable_split.cpp
|
2019-02-02 08:59:48 +08:00
|
|
|
src/ftxui/component/screen_interactive.cpp
|
2021-04-29 06:18:58 +08:00
|
|
|
src/ftxui/component/slider.cpp
|
2020-10-25 07:57:56 +08:00
|
|
|
src/ftxui/component/terminal_input_parser.cpp
|
|
|
|
src/ftxui/component/terminal_input_parser.hpp
|
2021-04-29 06:18:58 +08:00
|
|
|
src/ftxui/component/toggle.cpp
|
2019-02-02 08:59:48 +08:00
|
|
|
)
|
|
|
|
|
2021-06-26 21:14:27 +08:00
|
|
|
target_link_libraries(dom
|
|
|
|
PUBLIC screen
|
|
|
|
)
|
2020-03-21 23:13:14 +08:00
|
|
|
|
2021-06-26 21:14:27 +08:00
|
|
|
find_package(Threads)
|
|
|
|
target_link_libraries(component
|
|
|
|
PUBLIC dom
|
2021-10-10 18:52:34 +08:00
|
|
|
PUBLIC Threads::Threads
|
2021-06-26 21:14:27 +08:00
|
|
|
)
|
2020-03-25 08:38:50 +08:00
|
|
|
|
2021-10-10 18:52:34 +08:00
|
|
|
set_target_properties(screen PROPERTIES VERSION ${PROJECT_VERSION})
|
|
|
|
set_target_properties(dom PROPERTIES VERSION ${PROJECT_VERSION})
|
|
|
|
set_target_properties(component PROPERTIES VERSION ${PROJECT_VERSION})
|
|
|
|
|
2021-06-26 21:14:27 +08:00
|
|
|
include(cmake/ftxui_set_options.cmake)
|
|
|
|
ftxui_set_options(screen)
|
|
|
|
ftxui_set_options(dom)
|
|
|
|
ftxui_set_options(component)
|
2019-02-02 08:59:48 +08:00
|
|
|
|
2021-06-26 21:14:27 +08:00
|
|
|
if (FTXUI_BUILD_TESTS AND ${CMAKE_VERSION} VERSION_GREATER "3.11.4")
|
|
|
|
include(cmake/ftxui_test.cmake)
|
2021-03-22 05:54:39 +08:00
|
|
|
endif()
|
|
|
|
|
2020-02-11 21:04:23 +08:00
|
|
|
if(FTXUI_BUILD_EXAMPLES)
|
|
|
|
add_subdirectory(examples)
|
|
|
|
endif()
|
2020-05-25 07:34:13 +08:00
|
|
|
|
|
|
|
if(FTXUI_BUILD_DOCS)
|
|
|
|
add_subdirectory(doc)
|
|
|
|
endif()
|
2021-06-26 21:14:27 +08:00
|
|
|
|
|
|
|
include(cmake/iwyu.cmake)
|
|
|
|
include(cmake/ftxui_export.cmake)
|
2021-10-01 03:13:16 +08:00
|
|
|
|
|
|
|
if(FTXUI_ENABLE_INSTALL)
|
|
|
|
include(cmake/ftxui_install.cmake)
|
|
|
|
include(cmake/ftxui_package.cmake)
|
|
|
|
endif()
|