1tag_sources = [ 2 'gstvorbistag.c', 3 'gstid3tag.c', 4 'gstxmptag.c', 5 'gstexiftag.c', 6 'lang.c', 7 'licenses.c', 8 'tags.c', 9 'gsttagdemux.c', 10 'gsttagmux.c', 11 'gsttageditingprivate.c', 12 'id3v2.c', 13 'id3v2frames.c', 14 'xmpwriter.c', 15] 16 17tag_mkenum_headers = [ 18 'gsttagdemux.h', 19 'tag.h', 20] 21 22tag_headers = tag_mkenum_headers + [ 23 'gsttagmux.h', 24 'xmpwriter.h', 25 'tag-prelude.h', 26] 27install_headers(tag_headers, subdir : 'gstreamer-1.0/gst/tag/') 28 29tag_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', 34 install_header: true, 35 install_dir : join_paths(get_option('includedir'), 'gstreamer-1.0/gst/tag')) 36gsttag_c = tag_enums[0] 37gsttag_h = tag_enums[1] 38tag_gen_sources = [gsttag_h] 39 40install_data('license-translations.dict', 41 install_dir : join_paths(get_option('datadir'), 'gst-plugins-base', api_version)) 42 43gst_tag_args = [ 44 '-DLICENSE_TRANSLATIONS_PATH="@0@"'.format( 45 join_paths( 46 get_option('prefix'), 47 get_option('datadir'), 48 'gst-plugins-base', 49 api_version, 50 'license-translations.dict')) 51] 52 53# iso-codes (optional, used for language names lookup and translation) 54have_iso_codes = false 55iso_codes_dep = dependency('iso-codes', required: get_option('iso-codes')) 56if 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()) 62 have_iso_codes = true 63 elif get_option('iso-codes').enabled() 64 error('iso-codes was requested for libgsttag, but could not determine prefix') 65 endif 66 elif get_option('iso-codes').enabled() 67 error('iso-codes was requested for libgsttag, but does not provide iso 639') 68 endif 69endif 70core_conf.set('HAVE_ISO_CODES', have_iso_codes) 71 72# could drop optional zlib dep and use g_zlib_decompressor_new() 73zlib_dep = dependency('zlib', required : false) 74if 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') 78 endif 79endif 80core_conf.set('HAVE_ZLIB', true) 81 82tag_deps = [gst_base_dep, libm, zlib_dep] 83gsttag = 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], 87 version : libversion, 88 soversion : soversion, 89 darwin_versions : osxversion, 90 install : true, 91 dependencies : tag_deps, 92) 93 94if build_gir 95 gst_gir_extra_args = gir_init_section + [ '--c-include=gst/tag/tag.h' ] 96 tag_gen_sources += [gnome.generate_gir(gsttag, 97 sources : tag_sources + tag_headers + [gsttag_h] + [gsttag_c], 98 namespace : 'GstTag', 99 nsversion : api_version, 100 identifier_prefix : 'Gst', 101 symbol_prefix : 'gst', 102 export_packages : 'gstreamer-tag-1.0', 103 includes : ['Gst-1.0', 'GstBase-1.0'], 104 install : true, 105 extra_args : gst_gir_extra_args, 106 dependencies : tag_deps 107 )] 108endif 109 110tag_dep = declare_dependency(link_with: gsttag, 111 include_directories : [libsinc], 112 dependencies : tag_deps, 113 sources: tag_gen_sources) 114 115# Little program that reads iso_639.xml and outputs tables for us as fallback 116# for when iso-codes are not available (and so we don't have to read the xml 117# just to map codes) 118if have_iso_codes 119 executable('mklangtables', 'mklangtables.c', 120 c_args: ['-DHAVE_CONFIG_H'], 121 include_directories: [configinc, libsinc], 122 dependencies: gst_dep, 123 install: false) 124endif 125 126executable('mklicensestables', 'mklicensestables.c', 127 c_args : gst_plugins_base_args, 128 include_directories: [configinc], 129 dependencies : [tag_dep, gst_base_dep], 130 install : false) 131 132gst_tag_dir = meson.current_source_dir() 133