From 59d8f33cadc347a9d05ce4945426f644777b214a Mon Sep 17 00:00:00 2001 From: tastytea Date: Wed, 28 Oct 2020 10:01:33 +0100 Subject: [PATCH] Add fmt to dependencies. --- .drone.yml | 6 +++--- CMakeLists.txt | 1 + README.adoc | 2 ++ src/CMakeLists.txt | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index ee89bce..d5529b0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -26,7 +26,7 @@ steps: - alias apt-get='rm -f /var/cache/apt/archives/lock && apt-get' - apt-get update -q - apt-get install -qq build-essential cmake g++-10 clang pkg-config - - apt-get install -qq catch libcgicc-dev nlohmann-json3-dev libgit2-dev libcurl4-openssl-dev libicu-dev + - apt-get install -qq catch libcgicc-dev nlohmann-json3-dev libgit2-dev libcurl4-openssl-dev libicu-dev libfmt-dev - rm -rf build && mkdir -p build && cd build - cmake -G "Unix Makefiles" -DWITH_TESTS=YES .. - make VERBOSE=1 @@ -62,7 +62,7 @@ steps: - alias apt-get='rm -f /var/cache/apt/archives/lock && apt-get' - apt-get update -q - apt-get install -qq build-essential cmake clang pkg-config - - apt-get install -qq catch libcgicc-dev nlohmann-json-dev libgit2-dev libcurl4-openssl-dev libicu-dev + - apt-get install -qq catch libcgicc-dev nlohmann-json-dev libgit2-dev libcurl4-openssl-dev libicu-dev libfmt-dev - rm -rf build && mkdir -p build && cd build - cmake -G "Unix Makefiles" -DWITH_TESTS=YES .. - make VERBOSE=1 @@ -92,7 +92,7 @@ steps: - alias apt-get='rm -f /var/cache/apt/archives/lock && apt-get' - apt-get update -q - apt-get install -qq build-essential cmake clang pkg-config - - apt-get install -qq catch libcgicc-dev nlohmann-json-dev libgit2-dev libcurl4-gnutls-dev libicu-dev + - apt-get install -qq catch libcgicc-dev nlohmann-json-dev libgit2-dev libcurl4-gnutls-dev libicu-dev libfmt-dev - rm -rf build && mkdir -p build && cd build - cmake -G "Unix Makefiles" -DWITH_TESTS=YES .. - make VERBOSE=1 diff --git a/CMakeLists.txt b/CMakeLists.txt index 6830c25..0940ac3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,6 +42,7 @@ find_package(Filesystem REQUIRED COMPONENTS Final Experimental) pkg_check_modules(libgit2 REQUIRED IMPORTED_TARGET libgit2) find_package(CURL 7.56 REQUIRED) find_package(ICU REQUIRED COMPONENTS uc) +find_package(fmt 4 REQUIRED CONFIG) add_subdirectory(src) add_subdirectory(src/generators) diff --git a/README.adoc b/README.adoc index b3310f3..7650f1f 100644 --- a/README.adoc +++ b/README.adoc @@ -17,6 +17,7 @@ :uri-libgit2: https://libgit2.org/ :uri-libcurl: https://curl.haxx.se/libcurl/ :uri-icu: http://site.icu-project.org/ +:uri-fmt: https://github.com/fmtlib/fmt *{project}* turns form data into JSON and opens a pull request on link:https://schlomp.space/FediBlock/data[FediBlock/data]. Also included are @@ -113,6 +114,7 @@ The RSS generator expects the blocklist to be in * link:{uri-libgit2}[libgit2] with SSH support (tested: 1.0 / 0.26) * link:{uri-libcurl}[libcurl] (at least: 7.56) * link:{uri-icu}[ICU] (tested: 67.1 / 60.2) +* link:{uri-fmt}[fmt] (tested: 7.0 / 4.0) * Optional ** Tests: link:{uri-catch}[Catch] (tested: 2.5 / 1.10) ** DEB package: link:{uri-dpkg}[dpkg] (tested: 1.19) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 15d4b21..7fec9f5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -19,7 +19,8 @@ target_link_libraries(fediblock nlohmann_json std::filesystem PkgConfig::libgit2 - ICU::uc) + ICU::uc + fmt::fmt) if(${CMAKE_VERSION} VERSION_LESS 3.12) target_link_libraries(fediblock PUBLIC ${CURL_LIBRARIES})