generated from cpp-best-practices/cmake_template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dependencies.cmake
43 lines (34 loc) · 994 Bytes
/
Dependencies.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
include(cmake/CPM.cmake)
# Done as a function so that updates to variables like
# CMAKE_CXX_FLAGS don't propagate out to other
# targets
function(modern_cpp_playground_setup_dependencies)
# For each dependency, see if it's
# already been provided to us by a parent project
if(NOT TARGET fmtlib::fmtlib)
cpmaddpackage("gh:fmtlib/fmt#9.1.0")
endif()
if(NOT TARGET spdlog::spdlog)
cpmaddpackage(
NAME
spdlog
VERSION
1.11.0
GITHUB_REPOSITORY
"gabime/spdlog"
OPTIONS
"SPDLOG_FMT_EXTERNAL ON")
endif()
if(NOT TARGET Catch2::Catch2WithMain)
cpmaddpackage("gh:catchorg/[email protected]")
endif()
if(NOT TARGET CLI11::CLI11)
cpmaddpackage("gh:CLIUtils/[email protected]")
endif()
if(NOT TARGET ftxui::screen)
cpmaddpackage("gh:ArthurSonzogni/FTXUI#e23dbc7473654024852ede60e2121276c5aab660")
endif()
if(NOT TARGET tools::tools)
cpmaddpackage("gh:lefticus/tools#update_build_system")
endif()
endfunction()