Run gst-indent through the files
[platform/upstream/gst-plugins-good.git] / meson.build
index d861fdf..6d57205 100644 (file)
@@ -40,6 +40,7 @@ if cc.get_id() == 'msvc'
       '/wd4146', # unary minus on unsigned (beware INT_MIN)
       '/wd4244', # lossy type conversion (e.g. double -> int)
       '/wd4305', # truncating type conversion (e.g. double -> float)
+      cc.get_supported_arguments(['/utf-8']), # set the input encoding to utf-8
       language : 'c')
   # Disable SAFESEH with MSVC for plugins and libs that use external deps that
   # are built with MinGW
@@ -80,6 +81,12 @@ if glib_asserts.disabled() or (glib_asserts.auto() and not gst_version_is_dev)
   add_project_arguments('-DG_DISABLE_ASSERT', language: 'c')
 endif
 
+glib_checks = get_option('glib-checks')
+if glib_checks.disabled() or (glib_checks.auto() and not gst_version_is_dev)
+  message('Disabling GLib checks')
+  add_project_arguments('-DG_DISABLE_CHECKS', language: 'c')
+endif
+
 cdata = configuration_data()
 
 check_headers = [
@@ -134,7 +141,6 @@ check_functions = [
   ['HAVE_GETPAGESIZE', 'getpagesize', '#include<unistd.h>'],
 # check token HAVE_GETTEXT
 # check token HAVE_GST_V4L2
-# check token HAVE_IOS
   ['HAVE_ISINF', 'isinf', '#include<math.h>'],
 # check token HAVE_LIBV4L2
   ['HAVE_MMAP', 'mmap', '#include<sys/mman.h>'],
@@ -154,6 +160,8 @@ foreach f : check_functions
   endif
 endforeach
 
+cdata.set('HAVE_IOS', host_system == 'ios')
+
 cdata.set('SIZEOF_CHAR', cc.sizeof('char'))
 cdata.set('SIZEOF_INT', cc.sizeof('int'))
 cdata.set('SIZEOF_LONG', cc.sizeof('long'))
@@ -297,13 +305,19 @@ if build_gstgl
   endforeach
 endif
 
-zlib_dep = dependency('zlib', fallback: ['zlib', 'zlib_dep'])
+zlib_dep = dependency('zlib', required : false)
+if not zlib_dep.found()
+  zlib_dep = cc.find_library('z', required : false)
+  if not zlib_dep.found() or not cc.has_header('zlib.h')
+    zlib_dep = subproject('zlib').get_variable('zlib_dep')
+  endif
+endif
+cdata.set('HAVE_ZLIB', true)
+
 glib_deps = [dependency('glib-2.0', version : glib_req, fallback: ['glib', 'libglib_dep']),
              dependency('gobject-2.0', fallback: ['glib', 'libgobject_dep'])]
 gio_dep = dependency('gio-2.0', fallback: ['glib', 'libgio_dep'])
 
-cdata.set('HAVE_ZLIB', zlib_dep.found())
-
 gst_plugins_good_args = ['-DHAVE_CONFIG_H']
 configinc = include_directories('.')
 libsinc = include_directories('gst-libs')
@@ -369,5 +383,5 @@ endif
 
 configure_file(output : 'config.h', configuration : cdata)
 
-python3 = import('python3').find_python()
+python3 = import('python').find_installation()
 run_command(python3, '-c', 'import shutil; shutil.copy("hooks/pre-commit.hook", ".git/hooks/pre-commit")')