meson: Declare internal libgimp(ui) dependency

By using Meson's `declare_dependency()`, we can avoid specifying the
linked libraries, dependencies and includes we need over and over again.

Basically, this conceptually acts like an internal pkg-config.
This commit is contained in:
Niels De Graef 2020-05-11 06:34:31 +02:00
parent 7025039b93
commit 904a2e422d
1 changed files with 38 additions and 7 deletions

View File

@ -291,7 +291,10 @@ libgimp = library('gimp-'+ gimp_api_version,
libgimp_sources,
include_directories: rootInclude,
dependencies: [
gegl, gexiv2, gtk3, drmingw,
gegl,
gexiv2,
drmingw,
gtk3,
],
c_args: [ '-DG_LOG_DOMAIN="LibGimp"', '-DGIMP_COMPILATION', ],
link_with: [
@ -304,19 +307,33 @@ libgimp = library('gimp-'+ gimp_api_version,
version: so_version,
)
libgimpui = library('gimpui-'+ gimp_api_version,
libgimpui_sources,
include_directories: rootInclude,
# Define an internal dependency for ease of reuse
libgimp_dep = declare_dependency(
dependencies: [
gegl, gexiv2, gtk3,
cairo,
gdk_pixbuf,
gegl,
],
c_args: [ '-DG_LOG_DOMAIN="LibGimpUI"', '-DGIMP_COMPILATION', ],
link_with: [
libgimp,
libgimpbase,
libgimpcolor,
libgimpconfig,
libgimpmath,
],
include_directories: rootInclude,
)
libgimpui = library('gimpui-'+ gimp_api_version,
libgimpui_sources,
dependencies: [
libgimp_dep,
gexiv2,
gtk3,
],
c_args: [ '-DG_LOG_DOMAIN="LibGimpUI"', '-DGIMP_COMPILATION', ],
link_with: [
libgimpmodule,
libgimpwidgets,
],
@ -325,6 +342,20 @@ libgimpui = library('gimpui-'+ gimp_api_version,
version: so_version,
)
# Define an internal dependency for ease of reuse
libgimpui_dep = declare_dependency(
dependencies: [
libgimp_dep,
gtk3,
],
link_with: [
libgimpmodule,
libgimpui,
libgimpwidgets,
],
include_directories: rootInclude,
)
install_headers(
libgimp_headers,