mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-02 21:48:55 +00:00
Meson: Fix useless reconfigure when plugins libs change
This is a workaround for a Meson bug that incorrectly trigger reconfigure when files change in build directory. This commit can be reverted once GStreamer depends on Meson >=0.54.0. See https://github.com/mesonbuild/meson/pull/6770 Fixes: #85
This commit is contained in:
parent
7fa292406e
commit
7ef372db76
3 changed files with 7 additions and 4 deletions
|
@ -170,6 +170,9 @@ all_plugins_paths = []
|
||||||
foreach plugin: all_plugins
|
foreach plugin: all_plugins
|
||||||
all_plugins_paths += plugin.full_path()
|
all_plugins_paths += plugin.full_path()
|
||||||
endforeach
|
endforeach
|
||||||
|
# Work around meson bug: https://github.com/mesonbuild/meson/pull/6770
|
||||||
|
pathsep = host_machine.system() == 'windows' ? ';' : ':'
|
||||||
|
all_plugins_paths = pathsep.join(all_plugins_paths)
|
||||||
|
|
||||||
generate_plugins_paths = find_program('scripts/generate_plugins_path.py')
|
generate_plugins_paths = find_program('scripts/generate_plugins_path.py')
|
||||||
configure_file(
|
configure_file(
|
||||||
|
|
|
@ -19,12 +19,12 @@ gst_init_static_plugins (void)
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument(dest="output", help="Output file")
|
parser.add_argument(dest="output", help="Output file")
|
||||||
parser.add_argument(dest="plugins", nargs=argparse.REMAINDER, help="The list of plugins")
|
parser.add_argument(dest="plugins", help="The list of plugins")
|
||||||
|
|
||||||
options = parser.parse_args()
|
options = parser.parse_args()
|
||||||
|
|
||||||
names = set()
|
names = set()
|
||||||
for plugin in options.plugins:
|
for plugin in options.plugins.split(os.pathsep):
|
||||||
filename = os.path.basename(plugin)
|
filename = os.path.basename(plugin)
|
||||||
if filename.startswith('libgst') and filename.endswith('.a'):
|
if filename.startswith('libgst') and filename.endswith('.a'):
|
||||||
names.add(filename[len('libgst'):-len('.a')])
|
names.add(filename[len('libgst'):-len('.a')])
|
||||||
|
|
|
@ -7,12 +7,12 @@ import json
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument(dest="output", help="Output file")
|
parser.add_argument(dest="output", help="Output file")
|
||||||
parser.add_argument(dest="plugins", nargs=argparse.REMAINDER, help="The list of plugins")
|
parser.add_argument(dest="plugins", help="The list of plugins")
|
||||||
|
|
||||||
options = parser.parse_args()
|
options = parser.parse_args()
|
||||||
|
|
||||||
all_paths = set()
|
all_paths = set()
|
||||||
for plugin in options.plugins:
|
for plugin in options.plugins.split(os.pathsep):
|
||||||
all_paths.add(os.path.dirname(plugin))
|
all_paths.add(os.path.dirname(plugin))
|
||||||
|
|
||||||
with open(options.output, "w") as f:
|
with open(options.output, "w") as f:
|
||||||
|
|
Loading…
Reference in a new issue