Depend on libfmt explicitly

Since otherwise the include might not be visible and we need those now.
This commit is contained in:
Nicolas Werner 2024-08-05 19:30:46 +02:00
parent 1aa15af11f
commit 0599444552
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
2 changed files with 22 additions and 3 deletions

View file

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

View file

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