Fix zlib detection when there is no pkg-config file
authorXavier Claessens <xavier.claessens@collabora.com>
Mon, 19 Nov 2018 21:31:20 +0000 (16:31 -0500)
committerXavier Claessens <xclaesse@gmail.com>
Wed, 21 Nov 2018 14:56:56 +0000 (14:56 +0000)
gst-libs/gst/tag/meson.build

index 8ea9d9c..9833859 100644 (file)
@@ -70,8 +70,14 @@ endif
 core_conf.set('HAVE_ISO_CODES', have_iso_codes)
 
 # could drop optional zlib dep and use g_zlib_decompressor_new()
-zlib_dep = dependency('zlib', required: false, fallback: ['zlib', 'zlib_dep'])
-core_conf.set('HAVE_ZLIB', zlib_dep.found())
+zlib_dep = dependency('zlib', required : false)
+if not zlib_dep.found()
+  zlib_dep = cc.find_library('z', required : false)
+  if not zlib_dep.found()
+    zlib_dep = subproject('zlib').get_variable('zlib_dep')
+  endif
+endif
+core_conf.set('HAVE_ZLIB', true)
 
 tag_deps = [gst_base_dep, libm, zlib_dep]
 gsttag = library('gsttag-@0@'.format(api_version),