summaryrefslogtreecommitdiff
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
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
-rw-r--r--meson.build12
-rw-r--r--meson_options.txt4
2 files changed, 16 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)
diff --git a/meson_options.txt b/meson_options.txt
index 0006cd75c..1c761dbeb 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -30,3 +30,7 @@ option('with_man',
description: 'Whether to generate man pages (requires xlstproc)',
type: 'boolean',
value: true)
+option('enable_relocatable',
+ description: 'Whether to enable application bundle relocation support',
+ type: 'boolean',
+ value: false)