summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gmail.com>2018-06-08 09:40:39 +0000
committerEmmanuele Bassi <ebassi@gmail.com>2018-06-08 09:40:39 +0000
commit62a7b793b2d7ba40558b87317bde8823a8329a23 (patch)
tree6893785526891d82934275c67f0ef5fce1e25674
parent5ec6746e86faa3ebdebd170e8edcc70978868556 (diff)
parent268d3b890008f6b0c1a84c1686ad82e8efc84d5e (diff)
downloadgdk-pixbuf-62a7b793b2d7ba40558b87317bde8823a8329a23.tar.gz
Merge branch 'master.msvcfixes' into 'master'
Few fixes for Visual Studio builds See merge request GNOME/gdk-pixbuf!8
-rw-r--r--build-aux/post-install.bat23
-rw-r--r--meson.build26
2 files changed, 40 insertions, 9 deletions
diff --git a/build-aux/post-install.bat b/build-aux/post-install.bat
new file mode 100644
index 000000000..60981ffb2
--- /dev/null
+++ b/build-aux/post-install.bat
@@ -0,0 +1,23 @@
+@echo off
+
+set libdir=%1
+set binary_version=%2
+
+set libdir_windows=%libdir:/=\%
+
+if not "%DESTDIR%" == "" goto warn_msg
+if not exist %libdir_windows%\gdk-pixbuf-2.0\%binary_version%\ mkdir %libdir_windows%\gdk-pixbuf-2.0\%binary_version%
+gdk-pixbuf-query-loaders > %libdir_windows%\gdk-pixbuf-2.0\%binary_version%\loaders.cache
+
+goto end
+
+:warn_msg
+echo ***
+echo *** Warning: loaders.cache not built
+echo ***
+echo *** You should generate this file manually on the host system
+echo *** using:
+echo *** gdk-pixbuf-query-loaders ^> %libdir_windows%\gdk-pixbuf-2.0\%binary_version%\loaders.cache
+echo ***
+
+:end \ No newline at end of file
diff --git a/meson.build b/meson.build
index a989b4069..fafaf2da3 100644
--- a/meson.build
+++ b/meson.build
@@ -94,7 +94,7 @@ if cc.has_function('setrlimit', prefix: '#include <sys/time.h>\n#include <sys/re
endif
# We use links() because sigsetjmp() is often a macro hidden behind other macros
-gdk_pixbuf_conf.set10('HAVE_SIGSETJMP',
+gdk_pixbuf_conf.set('HAVE_SIGSETJMP',
cc.links('''#define _POSIX_SOURCE
#include <setjmp.h>
int main (void) {
@@ -218,7 +218,7 @@ gdk_pixbuf_deps = [ mathlib_dep, gobject_dep, gmodule_dep, gio_dep, shared_mime_
# Check if we can build shared modules
build_modules = gmodule_dep.get_pkgconfig_variable('gmodule_supported') == 'true'
-gdk_pixbuf_conf.set10('USE_GMODULE', build_modules)
+gdk_pixbuf_conf.set('USE_GMODULE', build_modules)
# Check which loaders should be built into gdk-pixbuf
builtin_loaders = get_option('builtin_loaders').split(',')
@@ -304,9 +304,9 @@ if get_option('jpeg') and not native_windows_loaders
enabled_loaders += 'jpeg'
loaders_deps += jpeg_dep
- gdk_pixbuf_conf.set10('HAVE_PROGRESSIVE_JPEG',
- cc.has_function('jpeg_simple_progression',
- dependencies: jpeg_dep))
+ gdk_pixbuf_conf.set('HAVE_PROGRESSIVE_JPEG',
+ cc.has_function('jpeg_simple_progression',
+ dependencies: jpeg_dep))
endif
endif
endif
@@ -407,10 +407,18 @@ subdir('thumbnailer')
subdir('docs')
if not meson.is_cross_build()
- meson.add_install_script('build-aux/post-install.sh',
- gdk_pixbuf_libdir,
- gdk_pixbuf_binary_version,
- )
+ # On Visual Studio, we don't normally have a shell interpreter, so use a .bat
+ if cc.get_id() == 'msvc'
+ meson.add_install_script('build-aux/post-install.bat',
+ gdk_pixbuf_libdir,
+ gdk_pixbuf_binary_version,
+ )
+ else
+ meson.add_install_script('build-aux/post-install.sh',
+ gdk_pixbuf_libdir,
+ gdk_pixbuf_binary_version,
+ )
+ endif
endif
summary = [