Add new symbol to docs and .def file
[platform/upstream/gstreamer.git] / meson.build
index ef22d2b..cbc3d5d 100644 (file)
@@ -1,14 +1,14 @@
 project('gstreamer', 'c',
-  version : '1.13.0.1',
+  version : '1.13.1.1',
   meson_version : '>= 0.40.1',
   default_options : [ 'warning_level=1',
                       'buildtype=debugoptimized' ])
 
 gst_version = meson.project_version()
 version_arr = gst_version.split('.')
-gst_version_major = version_arr[0]
-gst_version_minor = version_arr[1]
-gst_version_micro = version_arr[2]
+gst_version_major = version_arr[0].to_int()
+gst_version_minor = version_arr[1].to_int()
+gst_version_micro = version_arr[2].to_int()
 if version_arr.length() == 4
   gst_version_nano = version_arr[3].to_int()
 else
@@ -21,7 +21,7 @@ apiversion = '1.0'
 soversion = 0
 # maintaining compatibility with the previous libtool versioning
 # current = minor * 100 + micro
-libversion = '@0@.@1@.0'.format(soversion, gst_version_minor.to_int() * 100 + gst_version_micro.to_int())
+libversion = '@0@.@1@.0'.format(soversion, gst_version_minor * 100 + gst_version_micro)
 
 prefix = get_option('prefix')
 libtype = get_option('library_format')
@@ -45,7 +45,6 @@ if cc.get_id() == 'msvc'
 elif cc.has_argument('-Wl,-Bsymbolic-functions')
   # FIXME: Add an option for this if people ask for it
   add_project_link_arguments('-Wl,-Bsymbolic-functions', language : 'c')
-  # FIXME: Add FATAL_WARNINGS from configure.ac
 endif
 
 # Symbol visibility
@@ -54,6 +53,11 @@ if have_visibility_hidden
   add_project_arguments('-fvisibility=hidden', language: 'c')
 endif
 
+# Disable strict aliasing
+if cc.has_argument('-fno-strict-aliasing')
+  add_project_arguments('-fno-strict-aliasing', language: 'c')
+endif
+
 cdata = configuration_data()
 cdata.set_quoted('GST_API_VERSION', apiversion)
 cdata.set_quoted('GST_DATADIR', join_paths(prefix, get_option('datadir')))
@@ -78,6 +82,10 @@ cdata.set_quoted('GST_PTP_HELPER_INSTALLED', join_paths(prefix, helpers_install_
 cdata.set_quoted('GST_PLUGIN_SCANNER_SUBDIR', libexecdir,
   description: 'libexecdir path component, used to find plugin-scanner on relocatable builds on windows')
 
+if host_system == 'darwin'
+  cdata.set_quoted('GST_EXTRA_MODULE_SUFFIX', '.dylib')
+endif
+
 if gst_version_nano > 0
     # Have GST_ERROR message printed when running from git
     cdata.set('GST_LEVEL_DEFAULT', 'GST_LEVEL_ERROR')
@@ -330,6 +338,33 @@ if disable_gst_debug
   add_project_arguments(['-Wno-unused'], language: 'c')
 endif
 
+warning_flags = [
+  '-Wmissing-declarations',
+  '-Wmissing-prototypes',
+  '-Wredundant-decls',
+  '-Wundef',
+  '-Wwrite-strings',
+  '-Wformat',
+  '-Wformat-nonliteral',
+  '-Wformat-security',
+  '-Wold-style-definition',
+  '-Winit-self',
+  '-Wmissing-include-dirs',
+  '-Waddress',
+  '-Waggregate-return',
+  '-Wno-multichar',
+  '-Wnested-externs',
+  '-Wdeclaration-after-statement',
+  '-Wvla',
+  '-Wpointer-arith',
+]
+
+foreach extra_arg : warning_flags
+  if cc.has_argument (extra_arg)
+    add_project_arguments([extra_arg], language: 'c')
+  endif
+endforeach
+
 # Used by the gstutils test
 gmp_dep = cc.find_library('gmp', required : false)
 cdata.set('HAVE_GMP', gmp_dep.found())
@@ -434,9 +469,13 @@ subdir('plugins')
 subdir('tools')
 subdir('pkgconfig')
 subdir('tests')
-subdir('po')
 subdir('data')
 
+# xgettext is optional (on Windows for instance)
+if find_program('xgettext', required : false).found()
+  subdir('po')
+endif
+
 configure_file(output : 'config.h', configuration : cdata)
 
 if build_machine.system() == 'windows'