gstconfig.h: want deprecation warnings if GST_DISABLE_DEPRECATED is *set*
[platform/upstream/gstreamer.git] / meson.build
index ef22d2b..8855171 100644 (file)
@@ -6,9 +6,9 @@ project('gstreamer', 'c',
 
 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')
@@ -54,6 +54,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')))
@@ -434,9 +439,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'