summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2017-08-02 11:54:03 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2017-08-02 11:55:07 +0100
commit163648861cbc68326c679c9f78547b2b55296d88 (patch)
tree9db06a19e947b4b04fe1122964977257e17e40fb
parentd08ae184354dd6cb191f70425292639109d1a219 (diff)
downloadgdk-pixbuf-163648861cbc68326c679c9f78547b2b55296d88.tar.gz
meson: Build gdk-pixbuf-xlib
Contributed library.
-rw-r--r--contrib/gdk-pixbuf-xlib/meson.build46
-rw-r--r--docs/reference/gdk-pixbuf/meson.build1
-rw-r--r--meson.build6
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 000000000..71b50be3f
--- /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 f974b6081..47f241094 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 f18234074..e5b9e50ff 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')