Add update-orc-dist target
authorTim-Philipp Müller <tim@centricular.com>
Sat, 4 Jul 2020 14:00:35 +0000 (15:00 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 4 Jul 2020 14:01:08 +0000 (15:01 +0100)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/168>

meson.build

index ff397bf..dd35b4f 100644 (file)
@@ -87,10 +87,11 @@ if build_system == 'windows'
   subproject('win-nasm')
 endif
 
-subproject('orc', required: get_option('orc'))
+orc_subproject = subproject('orc', required: get_option('orc'))
 
 subprojects_names = []
 plugins_doc_caches = []
+orc_update_targets = []
 all_plugins = []
 foreach sp : subprojects
   project_name = sp[0]
@@ -115,6 +116,8 @@ foreach sp : subprojects
     endif
     all_plugins += plugins
 
+    orc_update_targets += subproj.get_variable('orc_update_targets', [])
+
     subprojects_names += [project_name]
     cmdres = run_command(python3, '-c', symlink.format(project_name, meson.current_source_dir()))
     if cmdres.returncode() == 0
@@ -308,3 +311,7 @@ update = find_program('git-update')
 run_target('git-update', command : [update])
 run_target('update', command : [update,
     '--builddir=@0@'.format(meson.current_build_dir())])
+
+if orc_subproject.found()
+  alias_target('update-orc-dist', orc_update_targets)
+endif