[gdk-pixbuf] build: Add Meson build option for relocatable builds



commit 64ac9d7a37986eef404914b66e220e0ea530b845
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Thu Aug 3 18:05:12 2017 +0800

    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

 meson.build       |   12 ++++++++++++
 meson_options.txt |    4 ++++
 2 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/meson.build b/meson.build
index b95eb9f..7daa4ce 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 0006cd7..1c761db 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)


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