From 6fede3b3979b90aef2268d49c6bd6ff5412003c5 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 a373ab509..09b4e24a5 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',