From 7fd900a78ede3890c885607157d1389cef7f41cc Mon Sep 17 00:00:00 2001 From: Andrea Pappacoda Date: Sat, 3 Aug 2024 17:45:57 +0200 Subject: [PATCH] build: make rapidjson_dep a public dependency Since a RapidJSON header is included in include/pistache/serializer/rapidjson.h, users using pistache must also add RapidJSON to their include path. Adding rapidjson_dep to the list of dependencies of pistache_dep makes rapidjson_dep a transitive (public) dependency, doing just that. Should fix the issue encountered by Duncan in . Also closes https://github.com/pistacheio/pistache/pull/1224 --- meson.build | 3 ++- src/meson.build | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 4b0e976ff..a3904becc 100644 --- a/meson.build +++ b/meson.build @@ -56,7 +56,8 @@ deps_libpistache = [ ] if get_option('PISTACHE_USE_RAPIDJSON') - deps_libpistache += dependency('RapidJSON', fallback: ['rapidjson', 'rapidjson_dep']) + rapidjson_dep = dependency('RapidJSON', fallback: ['rapidjson', 'rapidjson_dep']) + deps_libpistache += rapidjson_dep endif # Support Brotli compressed Content-Encoding responses... diff --git a/src/meson.build b/src/meson.build index c3a0283b7..309a6d4ae 100644 --- a/src/meson.build +++ b/src/meson.build @@ -76,7 +76,8 @@ libpistache = library( pistache_dep = declare_dependency( compile_args: public_args, include_directories: incl_pistache, - link_with: libpistache + link_with: libpistache, + dependencies: [ rapidjson_dep ] ) if meson.version().version_compare('>=0.54.0')