Skip to content

Commit ea9a592

Browse files
authored
Merge pull request #145 from leftibot/fix/issue-143-systemlink-cmake-module-is-unnecessary-c
Fix #143: SystemLink Cmake module is unnecessary complexity
2 parents 12e3e37 + c5426d7 commit ea9a592

4 files changed

Lines changed: 46 additions & 94 deletions

File tree

Dependencies.cmake

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,15 @@ function(myproject_setup_dependencies)
99
# already been provided to us by a parent project
1010

1111
if(NOT TARGET fmtlib::fmtlib)
12-
cpmaddpackage("gh:fmtlib/fmt#12.1.0")
12+
cpmaddpackage(
13+
NAME
14+
fmt
15+
GITHUB_REPOSITORY
16+
"fmtlib/fmt"
17+
GIT_TAG
18+
"12.1.0"
19+
SYSTEM
20+
YES)
1321
endif()
1422

1523
if(NOT TARGET spdlog::spdlog)
@@ -20,24 +28,56 @@ function(myproject_setup_dependencies)
2028
1.17.0
2129
GITHUB_REPOSITORY
2230
"gabime/spdlog"
31+
SYSTEM
32+
YES
2333
OPTIONS
2434
"SPDLOG_FMT_EXTERNAL ON")
2535
endif()
2636

2737
if(NOT TARGET Catch2::Catch2WithMain)
28-
cpmaddpackage("gh:catchorg/Catch2@3.12.0")
38+
cpmaddpackage(
39+
NAME
40+
Catch2
41+
VERSION
42+
3.12.0
43+
GITHUB_REPOSITORY
44+
"catchorg/Catch2"
45+
SYSTEM
46+
YES)
2947
endif()
3048

3149
if(NOT TARGET CLI11::CLI11)
32-
cpmaddpackage("gh:CLIUtils/CLI11@2.6.1")
50+
cpmaddpackage(
51+
NAME
52+
CLI11
53+
VERSION
54+
2.6.1
55+
GITHUB_REPOSITORY
56+
"CLIUtils/CLI11"
57+
SYSTEM
58+
YES)
3359
endif()
3460

3561
if(NOT TARGET ftxui::screen)
36-
cpmaddpackage("gh:ArthurSonzogni/FTXUI@6.1.9")
62+
cpmaddpackage(
63+
NAME
64+
FTXUI
65+
VERSION
66+
6.1.9
67+
GITHUB_REPOSITORY
68+
"ArthurSonzogni/FTXUI"
69+
SYSTEM
70+
YES)
3771
endif()
3872

3973
if(NOT TARGET tools::tools)
40-
cpmaddpackage("gh:lefticus/tools#main")
74+
cpmaddpackage(
75+
NAME
76+
tools
77+
GITHUB_REPOSITORY
78+
"lefticus/tools"
79+
GIT_TAG
80+
"main")
4181
endif()
4282

4383
endfunction()

ProjectOptions.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
include(cmake/SystemLink.cmake)
21
include(cmake/LibFuzzer.cmake)
32
include(CMakeDependentOption)
43
include(CheckCXXCompilerFlag)

cmake/SystemLink.cmake

Lines changed: 0 additions & 83 deletions
This file was deleted.

src/ftxui_sample/CMakeLists.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@ add_executable(intro main.cpp)
33
target_link_libraries(
44
intro
55
PRIVATE myproject::myproject_options
6-
myproject::myproject_warnings)
7-
8-
target_link_system_libraries(
9-
intro
10-
PRIVATE
6+
myproject::myproject_warnings
117
CLI11::CLI11
128
fmt::fmt
139
spdlog::spdlog

0 commit comments

Comments
 (0)