summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2020-07-04 00:31:49 +0100
committerTim-Philipp Müller <tim@centricular.com>2020-07-04 14:01:56 +0100
commit6bb3e01918db5c4a64004bf32b618105b1cb5f13 (patch)
tree2b4ff15dd3f7d8c205e2ef785f00458972c10734 /meson.build
parente82eb9d0fa90128e2ed41d350c6962c2bf54e5d2 (diff)
meson: add update-orc-dist target
Add target to update backup orc -dist.[ch] files. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/734>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build24
1 files changed, 24 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index c3c15c443..78a0cc4e2 100644
--- a/meson.build
+++ b/meson.build
@@ -317,6 +317,7 @@ gst_controller_dep = dependency('gstreamer-controller-1.0', version : gst_req,
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'])
@@ -417,6 +418,29 @@ if find_program('xgettext', required : get_option('nls')).found()
endif
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
+
# Use core_conf after all subdirs have set values
configure_file(output : 'config.h', configuration : core_conf)