diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2020-07-04 01:02:02 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2020-07-04 15:04:59 +0100 |
commit | 31ff32872781413fc8f71dc45dc5ddc0f2b97c5a (patch) | |
tree | 303e5f5a0b3466a8ff409b9e617dc48ed95a18f4 /meson.build | |
parent | c187684b783378881d9ef94ce8c0d635a74b3a33 (diff) | |
download | gstreamer-plugins-good-31ff32872781413fc8f71dc45dc5ddc0f2b97c5a.tar.gz |
meson: add update-orc-dist target
Add target to update backup orc -dist.[ch] files.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/662>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 692ed37e9..c003c2bb8 100644 --- a/meson.build +++ b/meson.build @@ -322,6 +322,7 @@ libsinc = include_directories('gst-libs') have_orcc = false orcc_args = [] +orc_targets = [] # Used by various libraries/elements that use Orc code orc_dep = dependency('orc-0.4', version : orc_req, required : get_option('orc'), fallback : ['orc', 'orc_dep']) @@ -414,6 +415,29 @@ subdir('ext') subdir('tests') subdir('docs') +if have_orcc + update_orc_dist_files = find_program('scripts/update-orc-dist-files.py') + + orc_update_targets = [] + foreach t : orc_targets + orc_name = t.get('name') + orc_file = t.get('orc-source') + header = t.get('header') + source = t.get('source') + # alias_target() only works with build targets, so can't use run_target() here + orc_update_targets += [ + custom_target('update-orc-@0@'.format(orc_name), + input: [header, source], + command: [update_orc_dist_files, orc_file, header, source], + output: ['@0@-dist.c'.format(orc_name)]) # not entirely true + ] + endforeach + + if meson.version().version_compare('>= 0.52') + update_orc_dist_target = alias_target('update-orc-dist', orc_update_targets) + endif +endif + # xgettext is optional (on Windows for instance) if find_program('xgettext', required : get_option('nls')).found() cdata.set('ENABLE_NLS', 1) |