Add dependencies to CMake config.

This commit is contained in:
tastytea 2020-02-29 22:11:16 +01:00
parent 3f80752239
commit ece6da5479
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
4 changed files with 10 additions and 1 deletions

View File

@ -38,6 +38,8 @@ if(WITH_CLANG-TIDY)
"-quiet")
endif()
add_subdirectory(cmake)
add_subdirectory(lib)
if(WITH_GUI)

5
cmake/CMakeLists.txt Normal file
View File

@ -0,0 +1,5 @@
include(GNUInstallDirs)
install(FILES
"FindFilesystem.cmake"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")

View File

@ -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")

View File

@ -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})