mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 00:01:23 +00:00
docs: Use the MESON_BUILD_ROOT env variable in the plugins cache generator
This commit is contained in:
parent
56d01406bc
commit
816710d17c
2 changed files with 3 additions and 8 deletions
|
@ -36,7 +36,6 @@ except ImportError: # python <3.3
|
||||||
# make it happen. For properties, the best way is to use th
|
# make it happen. For properties, the best way is to use th
|
||||||
# GST_PARAM_DOC_SHOW_DEFAULT flag.
|
# GST_PARAM_DOC_SHOW_DEFAULT flag.
|
||||||
UNSTABLE_VALUE = "unstable-values"
|
UNSTABLE_VALUE = "unstable-values"
|
||||||
BUILD_ROOT = "@BUILD_ROOT@"
|
|
||||||
|
|
||||||
|
|
||||||
def dict_recursive_update(d, u):
|
def dict_recursive_update(d, u):
|
||||||
|
@ -76,6 +75,7 @@ def test_unstable_values():
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
cache_filename = sys.argv[1]
|
cache_filename = sys.argv[1]
|
||||||
output_filename = sys.argv[2]
|
output_filename = sys.argv[2]
|
||||||
|
build_root = os.environ.get('MESON_BUILD_ROOT', '')
|
||||||
|
|
||||||
subenv = os.environ.copy()
|
subenv = os.environ.copy()
|
||||||
cache = {}
|
cache = {}
|
||||||
|
@ -93,7 +93,7 @@ if __name__ == "__main__":
|
||||||
gst_plugins_paths.append(os.path.dirname(plugin_path))
|
gst_plugins_paths.append(os.path.dirname(plugin_path))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with open(os.path.join(BUILD_ROOT, 'GstPluginsPath.json'), newline='\n') as f:
|
with open(os.path.join(build_root, 'GstPluginsPath.json'), newline='\n') as f:
|
||||||
plugin_paths = os.pathsep.join(json.load(f))
|
plugin_paths = os.pathsep.join(json.load(f))
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
plugin_paths = ""
|
plugin_paths = ""
|
||||||
|
|
|
@ -18,16 +18,11 @@ hotdoc_plugin_scanner = executable('gst-hotdoc-plugins-scanner',
|
||||||
install: true,
|
install: true,
|
||||||
)
|
)
|
||||||
|
|
||||||
conf = configuration_data()
|
|
||||||
# We pass the build root so the doc cache generator can try
|
|
||||||
# to find GstPluginsPath.json to set GST_PLUGIN_PATH and
|
|
||||||
# thus handle plugins dependencies.
|
|
||||||
conf.set('BUILD_ROOT', meson.build_root())
|
|
||||||
configure_file(
|
configure_file(
|
||||||
input: 'gst-plugins-doc-cache-generator.py',
|
input: 'gst-plugins-doc-cache-generator.py',
|
||||||
output: 'gst-plugins-doc-cache-generator',
|
output: 'gst-plugins-doc-cache-generator',
|
||||||
install_dir: helpers_install_dir,
|
install_dir: helpers_install_dir,
|
||||||
configuration: conf
|
copy: true
|
||||||
)
|
)
|
||||||
|
|
||||||
plugins_cache_generator = find_program(join_paths(meson.current_build_dir(), 'gst-plugins-doc-cache-generator'))
|
plugins_cache_generator = find_program(join_paths(meson.current_build_dir(), 'gst-plugins-doc-cache-generator'))
|
||||||
|
|
Loading…
Reference in a new issue