[gdk-pixbuf] meson: Build gdk-pixbuf-xlib



commit 163648861cbc68326c679c9f78547b2b55296d88
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Wed Aug 2 11:54:03 2017 +0100

    meson: Build gdk-pixbuf-xlib
    
    Contributed library.

 contrib/gdk-pixbuf-xlib/meson.build   |   46 +++++++++++++++++++++++++++++++++
 docs/reference/gdk-pixbuf/meson.build |    1 +
 meson.build                           |    6 ++++
 3 files changed, 53 insertions(+), 0 deletions(-)
---
diff --git a/contrib/gdk-pixbuf-xlib/meson.build b/contrib/gdk-pixbuf-xlib/meson.build
new file mode 100644
index 0000000..71b50be
--- /dev/null
+++ b/contrib/gdk-pixbuf-xlib/meson.build
@@ -0,0 +1,46 @@
+gdkpixbuf_xlib_sources = [
+  'gdk-pixbuf-xlib.c',
+  'gdk-pixbuf-xlib-render.c',
+  'gdk-pixbuf-xlib-drawable.c',
+  'gdk-pixbuf-xlibrgb.c',
+]
+
+gdkpixbuf_xlib_headers = [
+  'gdk-pixbuf-xlib.h',
+  'gdk-pixbuf-xlibrgb.h',
+]
+
+gdkpixbuf_xlib_api_path = join_paths('gdk-pixbuf-@0@'.format(gdk_pixbuf_api_version), 'gdk-pixbuf-xlib')
+
+install_headers(gdkpixbuf_xlib_headers, subdir: gdkpixbuf_xlib_api_path)
+
+gdkpixbuf_xlib = library('gdk_pixbuf_xlib-2.0',
+                         gdkpixbuf_xlib_sources,
+                         soversion: soversion,
+                         version: libversion,
+                         c_args: common_cflags + gdk_pixbuf_cflags + [
+                           '-DHAVE_CONFIG_H',
+                           '-DSTDC_HEADERS',
+                         ],
+                         link_args: common_ldflags,
+                         include_directories: [
+                           root_inc,
+                           include_directories('..')
+                         ],
+                         dependencies: gdk_pixbuf_deps + [ gdkpixbuf_dep, x11_dep ],
+                         install: true)
+
+# Compat variables for pkgconfig
+pkgconf = configuration_data()
+pkgconf.set('prefix', gdk_pixbuf_prefix)
+pkgconf.set('exec_prefix', gdk_pixbuf_prefix)
+pkgconf.set('libdir', gdk_pixbuf_libdir)
+pkgconf.set('includedir', gdk_pixbuf_includedir)
+pkgconf.set('GDK_PIXBUF_API_VERSION', gdk_pixbuf_api_version)
+pkgconf.set('VERSION', meson.project_version())
+
+configure_file(input: 'gdk-pixbuf-xlib-2.0.pc.in',
+               output: 'gdk-pixbuf-xlib-2.0.pc',
+               configuration: pkgconf,
+               install: true,
+               install_dir: join_paths(gdk_pixbuf_libdir, 'pkgconfig'))
diff --git a/docs/reference/gdk-pixbuf/meson.build b/docs/reference/gdk-pixbuf/meson.build
index f974b60..47f2410 100644
--- a/docs/reference/gdk-pixbuf/meson.build
+++ b/docs/reference/gdk-pixbuf/meson.build
@@ -26,6 +26,7 @@ if get_option('with_docs')
                src_dir: [
                  join_paths(meson.source_root(), 'gdk-pixbuf'),
                  join_paths(meson.build_root(), 'gdk-pixbuf'),
+                 join_paths(meson.source_root(), 'contrib', 'gdk-pixbuf-xlib'),
                ],
                dependencies: gdk_pixbuf_deps,
                gobject_typesfile: 'gdk-pixbuf.types',
diff --git a/meson.build b/meson.build
index f182340..e5b9e50 100644
--- a/meson.build
+++ b/meson.build
@@ -284,6 +284,12 @@ gnome = import('gnome')
 
 subdir('gdk-pixbuf')
 
+# X11
+x11_dep = dependency('x11', required: false)
+if x11_dep.found()
+  subdir('contrib/gdk-pixbuf-xlib')
+endif
+
 # i18n
 subdir('po')
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]