From f012b85d063d85046b711b273e7fb9bc19b9ba57 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 9 Sep 2024 10:00:25 -0700 Subject: [PATCH] meson: use `install_subdir` for headers This makes a single call to install the entire directory, and doesn't need an update if any new headers are added. It also will simplify bringing the Meson and CMake builds into allignment on how they handle the multi-header vs single-header setups. Signed-off-by: Dylan Baker --- meson.build | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index d456d0879..3f49aa163 100644 --- a/meson.build +++ b/meson.build @@ -16,8 +16,11 @@ nlohmann_json_multiple_headers = declare_dependency( 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') - install_headers('single_include/nlohmann/json_fwd.hpp', subdir: 'nlohmann') + install_subdir( + 'single_include/nlohmann', + install_dir: get_option('includedir'), + install_tag: 'devel', + ) pkgc = import('pkgconfig') pkgc.generate(name: 'nlohmann_json',