From c114ae963938fa9eabc4aca4775e5260e2d65faf Mon Sep 17 00:00:00 2001 From: Joel Schumacher Date: Tue, 19 Nov 2024 13:45:55 +0100 Subject: [PATCH] Add flag to not set JSON_NO_IO --- src/lib/nlohmann_json/meson.build | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/nlohmann_json/meson.build b/src/lib/nlohmann_json/meson.build index 172c6af0b..5327f3ea2 100644 --- a/src/lib/nlohmann_json/meson.build +++ b/src/lib/nlohmann_json/meson.build @@ -7,9 +7,14 @@ if not nlohmann_json.found() subdir_done() endif +nlohmann_json_compile_args = [] +if not get_variable('libcommon_json_io', false) + nlohmann_json_compile_args += '-DJSON_NO_IO' +endif + nlohmann_json_dep = declare_dependency( # no iostreams, please - compile_args: '-DJSON_NO_IO', + compile_args: nlohmann_json_compile_args, dependencies: nlohmann_json, )