mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 04:36:20 +00:00
build: also read the subproject list from a generated file
Fixes: https://gitlab.freedesktop.org/gstreamer/gst-build/-/issues/60 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/84>
This commit is contained in:
parent
d255d5b503
commit
72d92cc66e
1 changed files with 34 additions and 2 deletions
36
meson.build
36
meson.build
|
@ -12,12 +12,44 @@ else
|
||||||
pathsep = ':'
|
pathsep = ':'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
python3 = import('python').find_installation()
|
||||||
|
|
||||||
|
built_subprojects = get_option('built_subprojects')
|
||||||
|
if built_subprojects != ''
|
||||||
|
message('Have subprojects list from options')
|
||||||
|
else
|
||||||
|
read_file_contents = '''
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
assert len(sys.argv) >= 2
|
||||||
|
fname = sys.argv[1]
|
||||||
|
|
||||||
|
with open(fname, 'r') as f:
|
||||||
|
for l in f:
|
||||||
|
print(l)
|
||||||
|
'''
|
||||||
|
|
||||||
|
# gst-build will generate this file for us to consume so that subproject
|
||||||
|
# changes can still work
|
||||||
|
fname = join_paths(meson.build_root(), 'GstDocumentedSubprojects')
|
||||||
|
cmdres = run_command(
|
||||||
|
python3,
|
||||||
|
'-c', read_file_contents,
|
||||||
|
fname,
|
||||||
|
)
|
||||||
|
if cmdres.returncode() == 0
|
||||||
|
built_subprojects = cmdres.stdout().strip()
|
||||||
|
message('Have subprojects from file: @0@'.format(fname))
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
libs = ''
|
libs = ''
|
||||||
plugins_doc = ''
|
plugins_doc = ''
|
||||||
deps = []
|
deps = []
|
||||||
plugins_sitemap = ''
|
plugins_sitemap = ''
|
||||||
if get_option('built_subprojects') != ''
|
if built_subprojects != ''
|
||||||
foreach project_name: get_option('built_subprojects').split(',')
|
foreach project_name: built_subprojects.split(',')
|
||||||
sub = subproject(project_name)
|
sub = subproject(project_name)
|
||||||
if sub.get_variable('build_hotdoc')
|
if sub.get_variable('build_hotdoc')
|
||||||
message('Building @0@ documentation'.format(project_name))
|
message('Building @0@ documentation'.format(project_name))
|
||||||
|
|
Loading…
Reference in a new issue