diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b11fdf7..1702629 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,9 @@ cmake_minimum_required(VERSION 3.26.0) -project(ytcpp) - -add_executable(${PROJECT_NAME} main.cpp) +project(ytcpp + LANGUAGES CXX + VERSION 0.0.1 +) set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin) @@ -16,4 +17,29 @@ FetchContent_Declare(cpr GIT_REPOSITORY https://github.com/libcpr/cpr.git GIT_TAG c4713a704ca12237485ecbfec185f76c2a81bd09) FetchContent_MakeAvailable(cpr) -target_link_libraries(${PROJECT_NAME} PRIVATE cpr::cpr) +include(FetchContent) + +FetchContent_Declare(ftxui + GIT_REPOSITORY https://github.com/ArthurSonzogni/ftxui.git + GIT_TAG v4.0.0 +) + +FetchContent_GetProperties(ftxui) +if(NOT ftxui_POPULATED) + FetchContent_Populate(ftxui) + add_subdirectory(${ftxui_SOURCE_DIR} ${ftxui_BINARY_DIR} EXCLUDE_FROM_ALL) +endif() + +FetchContent_Declare(json URL https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz) +FetchContent_MakeAvailable(json) + +add_executable(${PROJECT_NAME} src/main.cpp) +target_include_directories(${PROJECT_NAME} PRIVATE src) + +target_link_libraries(${PROJECT_NAME} + PRIVATE cpr::cpr + PRIVATE ftxui::screen + PRIVATE ftxui::dom + PRIVATE ftxui::component + PRIVATE nlohmann_json::nlohmann_json +) |