Skip to content

Commit 50e9b9e

Browse files
jhasseTheLartians
andauthored
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 <TheLartians@users.noreply.github.com> * run cmake-format * disable cmake-format around code block Co-authored-by: Lars Melchior <TheLartians@users.noreply.github.com>
1 parent 03705fc commit 50e9b9e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

examples/spdlog/CMakeLists.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,20 @@ include(../../cmake/CPM.cmake)
88

99
CPMAddPackage("gh:gabime/spdlog@1.8.2")
1010

11+
# spdlog uses fmt and bundles that dependency. If you want to use fmt in your project as well, you
12+
# can let spdlog re-use fmt from CPM.cmake like this:
13+
#
14+
# cmake-format: off
15+
#
16+
# CPMAddPackage("gh:fmtlib/fmt#7.1.3")
17+
# CPMAddPackage(
18+
# GITHUB_REPOSITORY gabime/spdlog
19+
# VERSION 1.8.2
20+
# OPTIONS "SPDLOG_FMT_EXTERNAL 1"
21+
# )
22+
#
23+
# cmake-format: on
24+
1125
# ---- Executable ----
1226

1327
add_executable(CPMSpdlogExample main.cpp)

0 commit comments

Comments
 (0)