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 #1224
  • Loading branch information
Tachi107 committed Aug 3, 2024
1 parent 0fec569 commit a75d168
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 a75d168

Please sign in to comment.