--- CMakeLists.txt	2022-01-19 23:08:28
+++ CMakeLists.txt	2024-05-24 23:03:39
@@ -1,47 +1,14 @@
 cmake_minimum_required (VERSION 3.11)
+project(json-tui LANGUAGES CXX VERSION 1.3.0)
 
 # Dependencies -----------------------------------------------------------------
 
-include(FetchContent)
-set(FETCHCONTENT_UPDATES_DISCONNECTED TRUE)
-set(FETCHCONTENT_QUIET FALSE)
+find_package(ftxui REQUIRED)
 
-FetchContent_Declare(ftxui
-  GIT_REPOSITORY https://github.com/ArthurSonzogni/ftxui
-  GIT_TAG 382205c05732a420a300e990218653b1c3ac0fc9
-  GIT_PROGRESS TRUE
-  GIT_SHALLOW FALSE
-)
+find_package(nlohmann_json REQUIRED)
 
-FetchContent_Declare(json
-  URL https://github.com/nlohmann/json/releases/download/v3.10.5/json-3.10.5.tar.xz
-)
+find_package(args REQUIRED)
 
-FetchContent_Declare(args
-  GIT_REPOSITORY https://github.com/Taywee/args
-  GIT_TAG a48e1f880813b367d2354963a58dedbf2b708584
-  GIT_PROGRESS TRUE
-  GIT_SHALLOW FALSE
-)
-
-FetchContent_GetProperties(ftxui)
-if(NOT ftxui_POPULATED)
-  FetchContent_Populate(ftxui)
-  add_subdirectory(${ftxui_SOURCE_DIR} ${ftxui_BINARY_DIR} EXCLUDE_FROM_ALL)
-endif()
-
-FetchContent_GetProperties(json)
-if(NOT json_POPULATED)
-  FetchContent_Populate(json)
-  add_subdirectory(${json_SOURCE_DIR} ${json_BINARY_DIR} EXCLUDE_FROM_ALL)
-endif()
-
-FetchContent_GetProperties(args)
-if(NOT args_POPULATED)
-  FetchContent_Populate(args)
-  add_subdirectory(${args_SOURCE_DIR} ${args_BINARY_DIR} EXCLUDE_FROM_ALL)
-endif()
-
 # Build ------------------------------------------------------------------------
 
 configure_file(
@@ -49,11 +16,6 @@
   ${CMAKE_CURRENT_BINARY_DIR}/src/version.hpp
 )
 
-project(json-tui
-  LANGUAGES CXX
-  VERSION 1.3.0
-)
-
 add_executable(json-tui
   src/main.cpp
   src/mytoggle.cpp
@@ -67,11 +29,11 @@
 )
 
 target_link_libraries(json-tui
-  PRIVATE ftxui::screen
-  PRIVATE ftxui::dom
-  PRIVATE ftxui::component
-  PRIVATE args
-  PRIVATE nlohmann_json::nlohmann_json
+  PUBLIC ftxui::screen
+  PUBLIC ftxui::dom
+  PUBLIC ftxui::component
+  # PUBLIC args
+  PUBLIC nlohmann_json::nlohmann_json
 )
 
 # Disable C++ exceptions.
