Skip to content
Snippets Groups Projects
Commit cedae890 authored by Heiko Becker's avatar Heiko Becker
Browse files

Use Feature summary and provide data for it

Makes the life of packagers and everybody who wants to build this
easier.

Closes #25.
parent f6633420
No related branches found
No related tags found
No related merge requests found
...@@ -47,16 +47,47 @@ if(NOT MSVC AND NOT APPLE) ...@@ -47,16 +47,47 @@ if(NOT MSVC AND NOT APPLE)
find_package(Threads REQUIRED) find_package(Threads REQUIRED)
endif() endif()
find_package(OpenSSL REQUIRED) include(FeatureSummary)
find_package(ZLIB REQUIRED)
find_package(Olm 2 REQUIRED) find_package(OpenSSL)
find_package(sodium REQUIRED) set_package_properties(OpenSSL PROPERTIES
DESCRIPTION "Open source SSL and TLS implementation and cryptographic library"
URL "https://www.openssl.org/"
TYPE REQUIRED
)
find_package(ZLIB)
set_package_properties(ZLIB PROPERTIES
DESCRIPTION "A free compression library unencumbered by patents"
URL "https://www.zlib.net/"
TYPE REQUIRED
)
find_package(Olm 2)
set_package_properties(Olm PROPERTIES
DESCRIPTION "An implementation of the Double Ratchet cryptographic ratchet"
URL "https://git.matrix.org/git/olm/about/"
TYPE REQUIRED
)
find_package(sodium)
set_package_properties(sodium PROPERTIES
DESCRIPTION "A modern, portable, easy to use crypto library"
URL "https://github.com/jedisct1/libsodium"
TYPE REQUIRED
)
find_package(nlohmann_json 3.2.0) find_package(nlohmann_json 3.2.0)
set_package_properties(nlohmann_json PROPERTIES
DESCRIPTION "JSON for Modern C++, a C++11 header-only JSON class"
URL "https://nlohmann.github.io/json/"
TYPE REQUIRED
)
set(Boost_USE_STATIC_LIBS OFF) set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_STATIC_RUNTIME OFF) set(Boost_USE_STATIC_RUNTIME OFF)
set(Boost_USE_MULTITHREADED ON) set(Boost_USE_MULTITHREADED ON)
find_package(Boost 1.66 REQUIRED find_package(Boost 1.66
COMPONENTS atomic COMPONENTS atomic
chrono chrono
date_time date_time
...@@ -65,6 +96,11 @@ find_package(Boost 1.66 REQUIRED ...@@ -65,6 +96,11 @@ find_package(Boost 1.66 REQUIRED
regex regex
system system
thread) thread)
set_package_properties(Boost PROPERTIES
DESCRIPTION "Free peer-reviewed portable C++ source libraries"
URL "https://www.boost.org/"
TYPE REQUIRED
)
add_library(matrix_client add_library(matrix_client
lib/http/client.cpp lib/http/client.cpp
...@@ -154,6 +190,8 @@ if(BUILD_LIB_EXAMPLES) ...@@ -154,6 +190,8 @@ if(BUILD_LIB_EXAMPLES)
add_subdirectory(examples) add_subdirectory(examples)
endif() endif()
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
# #
# Installation & Target configuration. # Installation & Target configuration.
# #
......
find_package(spdlog 1.0.0 CONFIG REQUIRED) find_package(spdlog 1.0.0 CONFIG)
set_package_properties(spdlog PROPERTIES
DESCRIPTION "Very fast, header only, C++ logging library"
URL "https://github.com/gabime/spdlog"
TYPE REQUIRED
)
include_directories(../tests) include_directories(../tests)
......
...@@ -2,7 +2,12 @@ enable_testing() ...@@ -2,7 +2,12 @@ enable_testing()
file(COPY fixtures DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) file(COPY fixtures DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
find_package(GTest REQUIRED) find_package(GTest)
set_package_properties(GTest PROPERTIES
DESCRIPTION "Google's framework for writing C++ tests"
URL "https://github.com/google/googletest"
TYPE REQUIRED
)
file(COPY fixtures DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) file(COPY fixtures DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment