11 'gsttageditingprivate.c',
17 tag_mkenum_headers = [
22 tag_headers = tag_mkenum_headers + [
27 install_headers(tag_headers, subdir : 'gstreamer-1.0/gst/tag/')
29 tag_enums = gnome.mkenums_simple('tag-enumtypes',
30 sources : tag_mkenum_headers,
31 body_prefix : '#ifdef HAVE_CONFIG_H\n#include "config.h"\n#endif',
32 header_prefix : '#include <gst/tag/tag-prelude.h>',
33 decorator : 'GST_TAG_API',
35 install_dir : join_paths(get_option('includedir'), 'gstreamer-1.0/gst/tag'))
36 gsttag_c = tag_enums[0]
37 gsttag_h = tag_enums[1]
38 tag_gen_sources = [gsttag_h]
40 install_data('license-translations.dict',
41 install_dir : join_paths(get_option('datadir'), 'gst-plugins-base', api_version))
44 '-DLICENSE_TRANSLATIONS_PATH="@0@"'.format(
47 get_option('datadir'),
50 'license-translations.dict'))
53 # iso-codes (optional, used for language names lookup and translation)
54 have_iso_codes = false
55 iso_codes_dep = dependency('iso-codes', required: get_option('iso-codes'))
56 if iso_codes_dep.found()
57 if iso_codes_dep.get_pkgconfig_variable('domains').split(' ').contains('iso_639-2')
58 iso_codes_prefix = iso_codes_dep.get_pkgconfig_variable('prefix')
59 if iso_codes_prefix != ''
60 core_conf.set_quoted('ISO_CODES_PREFIX', iso_codes_prefix)
61 core_conf.set_quoted('ISO_CODES_VERSION', iso_codes_dep.version())
63 elif get_option('iso-codes').enabled()
64 error('iso-codes was requested for libgsttag, but could not determine prefix')
66 elif get_option('iso-codes').enabled()
67 error('iso-codes was requested for libgsttag, but does not provide iso 639')
70 core_conf.set('HAVE_ISO_CODES', have_iso_codes)
72 # could drop optional zlib dep and use g_zlib_decompressor_new()
73 zlib_dep = dependency('zlib', required : false)
74 if not zlib_dep.found()
75 zlib_dep = cc.find_library('z', required : false)
76 if not zlib_dep.found() or not cc.has_header('zlib.h')
77 zlib_dep = subproject('zlib').get_variable('zlib_dep')
80 core_conf.set('HAVE_ZLIB', true)
82 tag_deps = [gst_base_dep, libm, zlib_dep]
83 gsttag = library('gsttag-@0@'.format(api_version),
84 tag_sources, gsttag_h, gsttag_c,
85 c_args : gst_plugins_base_args + gst_tag_args + ['-DBUILDING_GST_TAG'],
86 include_directories: [configinc, libsinc],
88 soversion : soversion,
89 darwin_versions : osxversion,
91 dependencies : tag_deps,
94 pkgconfig.generate(gsttag,
95 libraries : [gst_dep],
96 variables : pkgconfig_variables,
97 subdirs : pkgconfig_subdirs,
98 name : 'gstreamer-tag-1.0',
99 description : 'Tag base classes and helper functions',
103 gst_gir_extra_args = gir_init_section + [ '--c-include=gst/tag/tag.h' ]
104 tag_gir = gnome.generate_gir(gsttag,
105 sources : tag_sources + tag_headers + [gsttag_h] + [gsttag_c],
106 namespace : 'GstTag',
107 nsversion : api_version,
108 identifier_prefix : 'Gst',
109 symbol_prefix : 'gst',
110 export_packages : 'gstreamer-tag-1.0',
111 includes : ['Gst-1.0', 'GstBase-1.0'],
113 extra_args : gst_gir_extra_args,
114 dependencies : tag_deps
116 tag_gen_sources += [tag_gir]
119 tag_dep = declare_dependency(link_with: gsttag,
120 include_directories : [libsinc],
121 dependencies : tag_deps,
122 sources: tag_gen_sources)
124 meson.override_dependency('gstreamer-tag-1.0', tag_dep)
126 # Little program that reads iso_639.xml and outputs tables for us as fallback
127 # for when iso-codes are not available (and so we don't have to read the xml
130 executable('mklangtables', 'mklangtables.c',
131 c_args: ['-DHAVE_CONFIG_H'],
132 include_directories: [configinc, libsinc],
133 dependencies: gst_dep,
137 executable('mklicensestables', 'mklicensestables.c',
138 c_args : gst_plugins_base_args,
139 include_directories: [configinc],
140 dependencies : [tag_dep, gst_base_dep],
143 gst_tag_dir = meson.current_source_dir()