Skip to content

Commit ba59aeb

Browse files
committed
meson: Call meson.override_dependency() if Meson is new enough
This tells Meson that we intend libzstd_dep to be used by a parent project if the parent looks for a dependency named "libzstd". Without this, the mapping from "libzstd" to our variable libzstd_dep must be encoded in the Meson wrap file or in the parent's meson.build.
1 parent 22b4483 commit ba59aeb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

build/meson/lib/meson.build

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ libzstd = library('zstd',
127127
libzstd_dep = declare_dependency(link_with: libzstd,
128128
include_directories: join_paths(zstd_rootdir,'lib')) # Do not expose private headers
129129

130+
if meson.version().version_compare('>=0.54.0')
131+
meson.override_dependency('libzstd', libzstd_dep)
132+
endif
133+
130134
# we link to both:
131135
# - the shared library (for public symbols)
132136
# - the static library (for private symbols)

0 commit comments

Comments
 (0)