From b8f2858f42301f1ea3d7df9b7434d81236e840ca Mon Sep 17 00:00:00 2001 From: scawful Date: Wed, 25 Dec 2024 18:15:59 -0600 Subject: [PATCH] Add ftxui to z3ed cmake --- src/cli/z3ed.cmake | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/cli/z3ed.cmake b/src/cli/z3ed.cmake index fd3b7772..1dfd9b0b 100644 --- a/src/cli/z3ed.cmake +++ b/src/cli/z3ed.cmake @@ -1,6 +1,20 @@ +include(FetchContent) + +FetchContent_Declare(ftxui + GIT_REPOSITORY https://github.com/ArthurSonzogni/ftxui + GIT_TAG v5.0.0 +) + +FetchContent_GetProperties(ftxui) +if(NOT ftxui_POPULATED) + FetchContent_Populate(ftxui) + add_subdirectory(${ftxui_SOURCE_DIR} ${ftxui_BINARY_DIR} EXCLUDE_FROM_ALL) +endif() + add_executable( z3ed cli/z3ed.cc + cli/tui.cc cli/handlers/compress.cc cli/handlers/patch.cc cli/handlers/tile16_transfer.cc @@ -31,6 +45,9 @@ target_include_directories( target_link_libraries( z3ed PUBLIC asar-static + ftxui::component + ftxui::screen + ftxui::dom ${ABSL_TARGETS} ${SDL_TARGETS} ${PNG_LIBRARIES} @@ -39,4 +56,4 @@ target_link_libraries( ${CMAKE_DL_LIBS} ImGuiTestEngine ImGui -) \ No newline at end of file +)