Skip to content

Commit 851352f

Browse files
committed
MOD: Drop version requirement for system deps
1 parent 2e96099 commit 851352f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

CMakeLists.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,18 +119,19 @@ verbose_message("Applied compiler warnings.\n")
119119
include(FetchContent)
120120
# JSON
121121
if(${PROJECT_NAME_UPPERCASE}_USE_EXTERNAL_JSON)
122-
find_package(nlohmann_json 3.11.2 REQUIRED)
122+
find_package(nlohmann_json REQUIRED)
123123
else()
124+
set(json_version 3.11.2)
124125
if(CMAKE_VERSION VERSION_LESS 3.24)
125126
FetchContent_Declare(
126127
json
127-
URL https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz
128+
URL https://github.com/nlohmann/json/releases/download/v${json_version}/json.tar.xz
128129
)
129130
else()
130131
# DOWNLOAD_EXTRACT_TIMESTAMP added in 3.24
131132
FetchContent_Declare(
132133
json
133-
URL https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz
134+
URL https://github.com/nlohmann/json/releases/download/v${json_version}/json.tar.xz
134135
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
135136
)
136137
endif()
@@ -139,10 +140,10 @@ else()
139140
add_system_include_property(nlohmann_json)
140141
endif()
141142
# cpp-httplib
142-
set(httplib_version 0.11.4)
143143
if(${PROJECT_NAME_UPPERCASE}_USE_EXTERNAL_HTTPLIB)
144-
find_package(httplib ${httplib_version} REQUIRED)
144+
find_package(httplib REQUIRED)
145145
else()
146+
set(httplib_version 0.13.1)
146147
if(CMAKE_VERSION VERSION_LESS 3.24)
147148
FetchContent_Declare(
148149
httplib

0 commit comments

Comments
 (0)