diff --git a/CMakeLists.txt b/CMakeLists.txt index 04738bda..933ad9bb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,6 +50,7 @@ endmacro() project(nheko LANGUAGES CXX C) option(USE_BUNDLED_SPDLOG "Use the bundled version of spdlog." ${HUNTER_ENABLED}) +option(USE_BUNDLED_FMT "Use the bundled version of {fmt}." ${HUNTER_ENABLED}) option(USE_BUNDLED_OLM "Use the bundled version of libolm." ${HUNTER_ENABLED}) option(USE_BUNDLED_GTEST "Use the bundled version of Google Test." ${HUNTER_ENABLED}) option(USE_BUNDLED_CMARK "Use the bundled version of cmark." ${HUNTER_ENABLED}) @@ -180,6 +181,12 @@ else() pkg_check_modules(libcurl REQUIRED IMPORTED_TARGET libcurl) endif() +# fmt +if(USE_BUNDLED_FMT) + hunter_add_package_safe(fmt) +endif() +find_package(fmt 8.0.0 CONFIG REQUIRED) + # spdlog if(USE_BUNDLED_SPDLOG) hunter_add_package_safe(spdlog) @@ -896,6 +903,7 @@ target_link_libraries(nheko PRIVATE ${COEURL_TARGET_NAME} MatrixClient::MatrixClient cmark::cmark + fmt::fmt spdlog::spdlog Qt::Widgets Qt::Svg diff --git a/im.nheko.Nheko.yaml b/im.nheko.Nheko.yaml index 5d5238c3..88cc0611 100644 --- a/im.nheko.Nheko.yaml +++ b/im.nheko.Nheko.yaml @@ -74,13 +74,24 @@ modules: - sha256: bbcb8f8c03b5af33fcfcf11a74e9499f20a9043200b8552f78a6e8ba76e04d11 type: archive url: https://github.com/commonmark/cmark/archive/0.31.0.tar.gz + - name: fmt + buildsystem: cmake-ninja + config-opts: + - -DCMAKE_BUILD_TYPE=Release + - -DFMT_DOC=OFF + - -DFMT_TEST=OFF + sources: + - sha256: 40fc58bebcf38c759e11a7bd8fdc163507d2423ef5058bba7f26280c5b9c5465 + type: archive + url: https://github.com/fmtlib/fmt/releases/download/11.0.2/fmt-11.0.2.zip - name: spdlog buildsystem: cmake-ninja config-opts: - -DCMAKE_BUILD_TYPE=Release - - -DSPDLOG_BUILD_EXAMPLES=0 - - -DSPDLOG_BUILD_BENCH=0 - - -DSPDLOG_BUILD_TESTING=0 + - -DSPDLOG_BUILD_BENCH=OFF + - -DSPDLOG_BUILD_TESTING=OFF + - -DSPDLOG_BUILD_EXAMPLE=OFF + - -DSPDLOG_FMT_EXTERNAL=ON sources: - sha256: 1586508029a7d0670dfcb2d97575dcdc242d3868a259742b69f100801ab4e16b type: archive