summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2017-08-03 18:05:12 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2017-08-21 15:18:47 +0800
commit64ac9d7a37986eef404914b66e220e0ea530b845 (patch)
tree9ac619ac998f1059d2f0ca1b93e35618db513430 /meson.build
parent9cc9f903b4680d76cb0b6cdbf730f13bd440472a (diff)
downloadgdk-pixbuf-64ac9d7a37986eef404914b66e220e0ea530b845.tar.gz
build: Add Meson build option for relocatable builds
Add an option for relocatable builds, which is always enabled for Windows builds as the GDK-Pixbuf DLLs can be moved about depending on the packaging of the app. This is done as an option as relocatability is supported on non-Windows platforms as well. https://bugzilla.gnome.org/show_bug.cgi?id=785767
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build12
1 files changed, 12 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index b95eb9ffb..7daa4ce67 100644
--- a/meson.build
+++ b/meson.build
@@ -251,6 +251,18 @@ if get_option('enable_jasper')
endif
endif
+# Determine whether we enable application bundle relocation support, and we use
+# this always on Windows
+if host_system == 'windows'
+ relocatable = true
+else
+ relocatable = get_option('enable_relocatable')
+endif
+
+if relocatable
+ add_project_arguments([ '-DGDK_PIXBUF_RELOCATABLE' ], language: 'c')
+endif
+
gdk_pixbuf_conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
configure_file(output: 'config.h', configuration: gdk_pixbuf_conf)