From 2497c62f25c403116410dce3acc4bdf9a459d934 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Wed, 22 Nov 2023 15:19:49 +0100 Subject: [PATCH] fixed: refine the libfmt fetchcontent approach rather than doing a full MakeAvailable, only download, prepare then use from source directory --- cmake/Modules/DownloadFmt.cmake | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cmake/Modules/DownloadFmt.cmake b/cmake/Modules/DownloadFmt.cmake index 3a343358d..2bc4306d2 100644 --- a/cmake/Modules/DownloadFmt.cmake +++ b/cmake/Modules/DownloadFmt.cmake @@ -3,11 +3,10 @@ FetchContent_Declare(fmt DOWNLOAD_EXTRACT_TIMESTAMP ON URL https://github.com/fmtlib/fmt/archive/refs/tags/10.1.1.tar.gz URL_HASH SHA512=288c349baac5f96f527d5b1bed0fa5f031aa509b4526560c684281388e91909a280c3262a2474d963b5d1bf7064b1c9930c6677fe54a0d8f86982d063296a54c) -FetchContent_MakeAvailable(fmt) +FetchContent_Populate(fmt) # We do not want to use the target directly as that means it ends up -# in our depends list for downstream modules. Instead, use header -# only mode. -get_target_property(fmt_inc fmt::fmt INTERFACE_INCLUDE_DIRECTORIES) +# in our depends list for downstream modules and the installation list. +# Instead, we just download and use header only mode. add_compile_definitions(FMT_HEADER_ONLY) -include_directories(${fmt_inc}) +include_directories(${fmt_SOURCE_DIR}/include)