From ece6da54799dcb4fe0b50b0c5c36a3a6774ef089 Mon Sep 17 00:00:00 2001 From: tastytea Date: Sat, 29 Feb 2020 22:11:16 +0100 Subject: [PATCH] Add dependencies to CMake config. --- CMakeLists.txt | 2 ++ cmake/CMakeLists.txt | 5 +++++ lib/cmake/FediPotatoConfig.cmake.in | 2 ++ lib/src/CMakeLists.txt | 2 +- 4 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 cmake/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 6d1a0f7..206932a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,6 +38,8 @@ if(WITH_CLANG-TIDY) "-quiet") endif() +add_subdirectory(cmake) + add_subdirectory(lib) if(WITH_GUI) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt new file mode 100644 index 0000000..20b6c24 --- /dev/null +++ b/cmake/CMakeLists.txt @@ -0,0 +1,5 @@ +include(GNUInstallDirs) + +install(FILES + "FindFilesystem.cmake" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}") diff --git a/lib/cmake/FediPotatoConfig.cmake.in b/lib/cmake/FediPotatoConfig.cmake.in index 0ac4757..e764b25 100644 --- a/lib/cmake/FediPotatoConfig.cmake.in +++ b/lib/cmake/FediPotatoConfig.cmake.in @@ -1,5 +1,7 @@ include(CMakeFindDependencyMacro) find_dependency(mastodonpp 0.5 REQUIRED CONFIG) +find_dependency(Filesystem REQUIRED) +find_dependency(nlohmann_json REQUIRED CONFIG) include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") diff --git a/lib/src/CMakeLists.txt b/lib/src/CMakeLists.txt index b34fe97..668af0f 100644 --- a/lib/src/CMakeLists.txt +++ b/lib/src/CMakeLists.txt @@ -1,7 +1,7 @@ include(GNUInstallDirs) find_package(mastodonpp REQUIRED CONFIG) -find_package(Filesystem) +find_package(Filesystem REQUIRED) find_package(nlohmann_json REQUIRED CONFIG) add_library(${PROJECT_NAME})