From 50e9b9edb84d1ccd38c2694ca958cf322226eb9e Mon Sep 17 00:00:00 2001 From: Jan Niklas Hasse Date: Wed, 9 Nov 2022 12:23:09 +0100 Subject: [PATCH] Instead of spdlog's bundled fmt re-use it from CPM.cmake (#364) * Instead of spdlog's bundled fmt re-use it from CPM.cmake * Add comment about re-using fmt for spdlog * Update examples/spdlog/CMakeLists.txt Co-authored-by: Lars Melchior * run cmake-format * disable cmake-format around code block Co-authored-by: Lars Melchior --- examples/spdlog/CMakeLists.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/examples/spdlog/CMakeLists.txt b/examples/spdlog/CMakeLists.txt index cb55bda..580ccec 100644 --- a/examples/spdlog/CMakeLists.txt +++ b/examples/spdlog/CMakeLists.txt @@ -8,6 +8,20 @@ include(../../cmake/CPM.cmake) CPMAddPackage("gh:gabime/spdlog@1.8.2") +# spdlog uses fmt and bundles that dependency. If you want to use fmt in your project as well, you +# can let spdlog re-use fmt from CPM.cmake like this: +# +# cmake-format: off +# +# CPMAddPackage("gh:fmtlib/fmt#7.1.3") +# CPMAddPackage( +# GITHUB_REPOSITORY gabime/spdlog +# VERSION 1.8.2 +# OPTIONS "SPDLOG_FMT_EXTERNAL 1" +# ) +# +# cmake-format: on + # ---- Executable ---- add_executable(CPMSpdlogExample main.cpp)