Skip to content

Commit c842be7

Browse files
authored
install json only if required (#1157)
1 parent 9a6c745 commit c842be7

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

CMakeLists.txt

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ endif(WIN32)
204204

205205
option(
206206
WITH_API_ONLY
207-
"Only build the API (use as a header-only library). Overrides WITH_EXAMPLES"
207+
"Only build the API (use as a header-only library). Overrides WITH_EXAMPLES and all options to enable exporters"
208208
OFF)
209209
option(WITH_EXAMPLES "Whether to build examples" ON)
210210

@@ -269,13 +269,14 @@ endif()
269269
include(GNUInstallDirs)
270270

271271
if((NOT WITH_API_ONLY)
272-
OR WITH_ELASTICSEARCH
273-
OR WITH_ZIPKIN
274-
OR WITH_OTLP
275-
OR WITH_OTLP_HTTP
276-
OR WITH_ZPAGES
277-
OR BUILD_W3CTRACECONTEXT_TEST
278-
OR WITH_ETW)
272+
AND (WITH_ELASTICSEARCH
273+
OR WITH_ZIPKIN
274+
OR WITH_OTLP
275+
OR WITH_OTLP_HTTP
276+
OR WITH_ZPAGES
277+
OR BUILD_W3CTRACECONTEXT_TEST
278+
OR WITH_ETW
279+
))
279280
# nlohmann_json package is required for most SDK build configurations
280281
find_package(nlohmann_json QUIET)
281282
set(nlohmann_json_clone FALSE)

0 commit comments

Comments
 (0)