[gdk-pixbuf: 1/2] Disable relocation when built as a static libary on Windows
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdk-pixbuf: 1/2] Disable relocation when built as a static libary on Windows
- Date: Tue, 9 Aug 2022 15:28:36 +0000 (UTC)
commit 89fce0c2a1887b139b8a1bfbeb30c3d243c56f52
Author: Hesham Essam <hesham essam mail gmail com>
Date: Fri Jun 3 13:29:28 2022 +0200
Disable relocation when built as a static libary on Windows
gdk-pixbuf/gdk-pixbuf-io.c | 5 ++---
gdk-pixbuf/queryloaders.c | 2 +-
meson.build | 4 ++--
3 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c
index 182781178..e207d8143 100644
--- a/gdk-pixbuf/gdk-pixbuf-io.c
+++ b/gdk-pixbuf/gdk-pixbuf-io.c
@@ -182,6 +182,8 @@ get_file_formats (void)
return file_formats;
}
+#ifdef GDK_PIXBUF_RELOCATABLE // implies that gdk-pixbuf is built as a dll on windows
+
#ifdef G_OS_WIN32
/* DllMain function needed to tuck away the gdk-pixbuf DLL handle */
@@ -203,9 +205,6 @@ DllMain (HINSTANCE hinstDLL,
}
#endif
-
-#ifdef GDK_PIXBUF_RELOCATABLE
-
gchar *
gdk_pixbuf_get_toplevel (void)
{
diff --git a/gdk-pixbuf/queryloaders.c b/gdk-pixbuf/queryloaders.c
index ddcae7b6f..1d39b442e 100644
--- a/gdk-pixbuf/queryloaders.c
+++ b/gdk-pixbuf/queryloaders.c
@@ -280,7 +280,7 @@ query_module (GString *contents, const char *dir, const char *file)
g_free (path);
}
-#ifdef G_OS_WIN32
+#if defined(G_OS_WIN32) && defined(GDK_PIXBUF_RELOCATABLE)
static char *
get_libdir (void)
diff --git a/meson.build b/meson.build
index ed82464e4..6b123847f 100644
--- a/meson.build
+++ b/meson.build
@@ -382,7 +382,7 @@ endif
# Determine whether we enable application bundle relocation support, and we use
# this always on Windows
if host_system == 'windows'
- relocatable = true
+ relocatable = (get_option('default_library') != 'static')
else
relocatable = get_option('relocatable')
endif
@@ -447,7 +447,7 @@ summary('MediaLib', use_medialib, section: 'Build')
summary('Introspection', build_gir, section: 'Build')
summary('Documentation', build_docs, section: 'Build')
summary('Manual pages', get_option('man'), section: 'Build')
-summary('Relocatable', get_option('relocatable'), section: 'Build')
+summary('Relocatable', relocatable, section: 'Build')
summary('Build tests', get_option('tests'), section: 'Build')
summary('Installed tests', get_option('installed_tests'), section: 'Build')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]