generated from cpp-best-practices/cmake_template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dependencies.cmake
51 lines (41 loc) · 1.11 KB
/
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
44
45
46
47
48
49
50
51
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(chains_setup_dependencies)
# For each dependency, see if it's
# already been provided to us by a parent project
if(NOT TARGET stlab::stlab)
cpmaddpackage(
NAME stlab
VERSION 2.0.0a3
GITHUB_REPOSITORY "stlab/libraries"
OPTIONS "BUILD_TESTING OFF")
endif()
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()