meson: use -fno-strict-aliasing where supported
[platform/upstream/gstreamer.git] / ext / taglib / meson.build
1 taglib_sources = [
2   'gstapev2mux.cc',
3   'gstid3v2mux.cc',
4   'gsttaglibplugin.c',
5 ]
6
7 taglib_dep = dependency('taglib', version : '>= 1.5', required : false)
8
9 if taglib_dep.found() and add_languages('cpp', required : false)
10   extra_args = []
11   cxx = meson.get_compiler('cpp')
12   if cxx.has_argument('-fvisibility=hidden')
13     extra_args += ['-fvisibility=hidden']
14   endif
15   if cxx.has_argument('-fno-strict-aliasing')
16     extra_args += ['-fno-strict-aliasing']
17   endif
18
19   gsttaglib = library('gsttaglib',
20     taglib_sources,
21     c_args : gst_plugins_good_args + ['-DGST_USE_UNSTABLE_API'],
22     cpp_args : gst_plugins_good_args + ['-DGST_USE_UNSTABLE_API'] + extra_args,
23     include_directories : [configinc, libsinc],
24     dependencies : [gsttag_dep, taglib_dep],
25     install : true,
26     install_dir : plugins_install_dir,
27   )
28 endif