[gegl] Meson: Various fixes and simplifications
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] Meson: Various fixes and simplifications
- Date: Tue, 26 Apr 2022 15:30:01 +0000 (UTC)
commit be8978bab03e8cb1dd48b884398099c560bad48b
Author: Xavier Claessens <xavier claessens collabora com>
Date: Sun Apr 24 20:12:12 2022 -0400
Meson: Various fixes and simplifications
This fix usage of gegl as subproject.
gegl/meson.build | 1 +
meson.build | 54 +++++++++++++++++++++++++++-------------------
seamless-clone/meson.build | 31 +++++++++++---------------
3 files changed, 45 insertions(+), 41 deletions(-)
---
diff --git a/gegl/meson.build b/gegl/meson.build
index 54977f5ed..834c9c50c 100644
--- a/gegl/meson.build
+++ b/gegl/meson.build
@@ -137,6 +137,7 @@ if g_ir.found()
symbol_prefix: 'gegl',
header: 'gegl.h',
includes: [ 'GLib-2.0', 'GObject-2.0', 'Babl-0.1' ],
+ dependencies: [babl],
export_packages: 'gegl-' + api_version,
install: true,
)
diff --git a/meson.build b/meson.build
index 7af9178ec..f55a45e83 100644
--- a/meson.build
+++ b/meson.build
@@ -493,6 +493,38 @@ subdir('libs/rgbe')
subdir('opencl')
subdir('gegl')
subdir('libs/npd')
+
+# pkg-config file
+gegl_pub_deps = [
+ glib,
+ gobject,
+ gmodule,
+ gio,
+ json_glib,
+ babl,
+]
+
+pkgconfig.generate(gegl_lib,
+ filebase: 'gegl-' + api_version,
+ name: 'GEGL',
+ description: 'Generic Graphics Library',
+ version: meson.project_version(),
+ variables: 'pluginsdir=' + '${prefix}' / get_option('libdir') / api_name,
+ libraries: gegl_pub_deps,
+ libraries_private: gegl_npd_lib,
+ subdirs: api_name,
+)
+
+gegl_dep = declare_dependency(link_with: gegl_lib,
+ include_directories: geglInclude,
+ dependencies: [gegl_pub_deps, libnpd],
+ sources: g_ir.found() ? gegl_gir : [],
+)
+
+if meson.version().version_compare('>=0.54.0')
+ meson.override_dependency('gegl-' + api_version, gegl_dep)
+endif
+
subdir('seamless-clone')
subdir('bin')
subdir('tools')
@@ -538,28 +570,6 @@ if w3m.found()
endif
endif
-# pkg-config file
-pkgconfig.generate(filebase: 'gegl-' + api_version,
- name: 'GEGL',
- description: 'Generic Graphics Library',
- version: meson.project_version(),
- variables: 'pluginsdir=' + '${prefix}' / get_option('libdir') / api_name,
- requires: [
- gobject,
- gmodule,
- gio,
- json_glib,
- babl,
- ],
- libraries: [
- gegl_lib,
- gegl_npd_lib,
- math,
- ],
- subdirs: api_name,
-)
-
-
################################################################################
# Build summary
diff --git a/seamless-clone/meson.build b/seamless-clone/meson.build
index d67e279a9..55d86453d 100644
--- a/seamless-clone/meson.build
+++ b/seamless-clone/meson.build
@@ -18,14 +18,9 @@ seamlessclone_lib = library('gegl-sc-' + api_version,
seamlessclone_sources,
include_directories: [ rootInclude, geglInclude, ],
dependencies: [
- babl,
- glib,
- gobject,
+ gegl_dep,
poly2tri_c,
],
- link_with: [
- gegl_lib,
- ],
install: true,
)
@@ -34,22 +29,20 @@ install_headers(
subdir: api_name / 'sc'
)
-
-pkgconfig.generate(
+pkgconfig.generate(seamlessclone_lib,
filebase: 'gegl-sc-' + api_version,
name: 'GEGL Seamless Cloning',
description: 'Seamless Cloning Library Based on GEGL',
version: meson.project_version(),
- requires: [
- gobject,
- gmodule,
- gio,
- json_glib,
-
- babl,
- poly2tri_c.type_name() == 'internal' ? [] : poly2tri_c,
- 'gegl-' + api_version,
- ],
- libraries: seamlessclone_lib,
+ libraries: gegl_dep,
subdirs: api_name / 'sc',
)
+
+gegl_sc_dep = declare_dependency(link_with: seamlessclone_lib,
+ include_directories: seamlessInclude,
+ dependencies: [gegl_dep],
+)
+
+if meson.version().version_compare('>=0.54.0')
+ meson.override_dependency('gegl-sc-' + api_version, gegl_sc_dep)
+endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]