Add support for being used as a meson subproject #237
12
meson.build
12
meson.build
|
@ -72,6 +72,18 @@ libpkgconf = library('pkgconf',
|
|||
soversion : '3',
|
||||
)
|
||||
|
||||
# For other projects using libpkgconfig as a subproject
|
||||
dep_libpkgconf = declare_dependency(
|
||||
link_with : libpkgconf,
|
||||
include_directories : include_directories('.'),
|
||||
)
|
||||
|
||||
# If we have a new enough meson override the dependency so that only
|
||||
# `dependency('libpkgconf')` is required from the consumer
|
||||
if meson.version().version_compare('>= 0.54.0')
|
||||
meson.override_dependency('libpkgconf', dep_libpkgconf)
|
||||
endif
|
||||
|
||||
pkg = import('pkgconfig')
|
||||
pkg.generate(libpkgconf,
|
||||
name : 'libpkgconf',
|
||||
|
|
Loading…
Reference in New Issue