mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 05:33:36 +00:00
build: Override dependency for use as subproject
A pkgconfig file is already provided, which enables using `thorvg` once it is installed. However, this file is not, and cannot be, available at setup time if using `thorvg` as a subproject. In such cases, Meson provides the `override_dependency` mechanism for a subproject to tell its parent how to use it.
This commit is contained in:
parent
9c36b78140
commit
966aeb5ee3
2 changed files with 8 additions and 0 deletions
|
@ -1,3 +1,5 @@
|
||||||
header_files = ['thorvg.h']
|
header_files = ['thorvg.h']
|
||||||
|
|
||||||
|
thorvg_inc = include_directories('.')
|
||||||
|
|
||||||
install_headers(header_files)
|
install_headers(header_files)
|
||||||
|
|
|
@ -62,6 +62,12 @@ thorvg_lib = library(
|
||||||
override_options : override_options
|
override_options : override_options
|
||||||
)
|
)
|
||||||
|
|
||||||
|
thorvg_dep = declare_dependency(
|
||||||
|
include_directories: thorvg_inc,
|
||||||
|
link_with: thorvg_lib,
|
||||||
|
)
|
||||||
|
meson.override_dependency('thorvg', thorvg_dep)
|
||||||
|
|
||||||
pkg_mod = import('pkgconfig')
|
pkg_mod = import('pkgconfig')
|
||||||
|
|
||||||
pkg_mod.generate(
|
pkg_mod.generate(
|
||||||
|
|
Loading…
Add table
Reference in a new issue