2020-09-08 09:08:35 -03:00
|
|
|
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
|
|
|
|
|
|
|
|
|
|
project(CPMSpdlogExample)
|
|
|
|
|
|
|
|
|
|
# ---- Dependencies ----
|
|
|
|
|
|
|
|
|
|
include(../../cmake/CPM.cmake)
|
|
|
|
|
|
2021-02-23 07:14:32 +01:00
|
|
|
CPMAddPackage("gh:gabime/spdlog@1.8.2")
|
2020-09-08 09:08:35 -03:00
|
|
|
|
2022-11-09 12:23:09 +01:00
|
|
|
# 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
|
|
|
|
|
|
2020-09-08 09:08:35 -03:00
|
|
|
# ---- Executable ----
|
|
|
|
|
|
2021-02-07 17:08:04 +01:00
|
|
|
add_executable(CPMSpdlogExample main.cpp)
|
|
|
|
|
target_compile_features(CPMSpdlogExample PRIVATE cxx_std_17)
|
2020-09-08 09:08:35 -03:00
|
|
|
target_link_libraries(CPMSpdlogExample spdlog)
|