From ea92dd89a9d9f02561714864e9baebe78d7f9e83 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 9 Sep 2024 09:49:03 -0700 Subject: [PATCH] meson: use `override_dependency()` to set dependencies This simplifies the use of json as a subproject. Signed-off-by: Dylan Baker --- meson.build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meson.build b/meson.build index bdf0fa006..a373ab509 100644 --- a/meson.build +++ b/meson.build @@ -8,10 +8,12 @@ project('nlohmann_json', nlohmann_json_dep = declare_dependency( include_directories: include_directories('single_include') ) +meson.override_dependency('nlohmann_json', nlohmann_json_dep) nlohmann_json_multiple_headers = declare_dependency( include_directories: include_directories('include') ) +meson.override_dependency('nlohmann_json_multiple_headers', nlohmann_json_multiple_headers) if not meson.is_subproject() install_headers('single_include/nlohmann/json.hpp', subdir: 'nlohmann')