subproject('win-nasm')
endif
-pathsep = host_machine.system() == 'windows' ? ';' : ':'
-
subproject('orc', required: get_option('orc'))
subprojects_names = []
plugins_doc_caches = []
-all_plugins = ''
+all_plugins = []
foreach sp : subprojects
project_name = sp[0]
build_infos = sp[1]
else
plugins = []
endif
-
- foreach plugin: plugins
- all_plugins += pathsep + plugin.full_path()
- endforeach
+ all_plugins += plugins
subprojects_names += [project_name]
cmdres = run_command(python3, '-c', symlink.format(project_name, meson.current_source_dir()))
endif
endif
-cmdres = run_command(python3, find_program('scripts/generate_plugins_path.py'), '--builddir',
- meson.build_root(), all_plugins)
-assert(cmdres.returncode() == 0, 'Could not create plugins path: @0@'.format(cmdres.stderr()))
+all_plugins_paths = []
+foreach plugin: all_plugins
+ all_plugins_paths += plugin.full_path()
+endforeach
+
+generate_plugins_paths = find_program('scripts/generate_plugins_path.py')
+configure_file(
+ output : 'GstPluginsPath.json',
+ command : [generate_plugins_paths,
+ '@OUTPUT@',
+ all_plugins_paths]
+)
message('Building subprojects: ' + ', '.join(subprojects_names))
setenv = find_program('gst-env.py')
if __name__ == "__main__":
parser = argparse.ArgumentParser()
- parser.add_argument("--builddir", help="The meson build directory")
- parser.add_argument(dest="plugins", help="The list of plugins")
+ parser.add_argument(dest="output", help="Output file")
+ parser.add_argument(dest="plugins", nargs=argparse.REMAINDER, help="The list of plugins")
options = parser.parse_args()
all_paths = set()
- for plugin in options.plugins.split(os.pathsep):
+ for plugin in options.plugins:
all_paths.add(os.path.dirname(plugin))
- with open(os.path.join(options.builddir, 'GstPluginsPath.json'), "w") as f:
+ with open(options.output, "w") as f:
json.dump(list(all_paths), f, indent=4, sort_keys=True)