mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-15 22:01:27 +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 = ':'
|
||||
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 = ''
|
||||
plugins_doc = ''
|
||||
deps = []
|
||||
plugins_sitemap = ''
|
||||
if get_option('built_subprojects') != ''
|
||||
foreach project_name: get_option('built_subprojects').split(',')
|
||||
if built_subprojects != ''
|
||||
foreach project_name: built_subprojects.split(',')
|
||||
sub = subproject(project_name)
|
||||
if sub.get_variable('build_hotdoc')
|
||||
message('Building @0@ documentation'.format(project_name))
|
||||
|
|
Loading…
Reference in a new issue