Skip to content

Commit

Permalink
build: make rapidjson_dep a public dependency
Browse files Browse the repository at this point in the history
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
<https://github.com/pistacheio/pistache/pull/1221/files#r1693921738>.
Also closes pistacheio#1224
  • Loading branch information
Tachi107 authored and dgreatwood committed Nov 1, 2024
1 parent ed8b8f1 commit 7fd900a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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...
Expand Down
3 changes: 2 additions & 1 deletion src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 7fd900a

Please sign in to comment.