Work around issue using msys2 provided zlib
authorThibault Saunier <thibault.saunier@osg.samsung.com>
Sat, 19 Nov 2016 13:16:03 +0000 (05:16 -0800)
committerThibault Saunier <tsaunier@gnome.org>
Tue, 13 Dec 2016 15:58:31 +0000 (12:58 -0300)
https://bugzilla.gnome.org/show_bug.cgi?id=775281

meson.build

index c774c47..04358f6 100644 (file)
@@ -11,6 +11,14 @@ subprojects = [
     'gst-plugins-good',
 ]
 
+cc = meson.get_compiler('c')
+if not meson.is_subproject() and cc.get_id() == 'msvc'
+  # Make it possible to use msys2 built zlib
+  # which fails when not using the mingw toolchain as
+  # it uses unistd.h
+  add_global_arguments('-DZ_SOLO', language: 'c')
+endif
+
 # FIXME Remove that check once we have ffmpeg as a gst-libav subproject
 libavfilter_dep = dependency('libavfilter', version: '>= 6.47.100', required: false)
 gst_libav = []