From 5c6a8a1cc6afd497aaf9d740a69ba65f1f8dacc2 Mon Sep 17 00:00:00 2001 From: Patrick Wuttke Date: Sun, 2 Mar 2025 22:20:21 +0100 Subject: [PATCH] Fixed issue with dependency injection not working due to the 'add target via name in dependencies' shortcut :/. --- SConscript | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/SConscript b/SConscript index 975254e..316c5a9 100644 --- a/SConscript +++ b/SConscript @@ -369,14 +369,11 @@ def _wrap_builder(builder, target_type: TargetType): def _wrapped(env, dependencies = {}, *args, **kwargs): target_dependencies = [] for name, version_spec in dependencies.items(): - if version_spec == {}: + if version_spec == {} and name not in env['SPP_DEPENDENCIES']: # this is basically a shortcut to adding targets from other modules without having to save them in the env dep_target = _find_target(env, name) if dep_target is not None and dep_target.target_type != TargetType.PROGRAM: - #if 'LIBS' in kwargs: - # kwargs['LIBS'].append(dep_target) - #else: - # kwargs['LIBS'] = [dep_target] target_dependencies.append(dep_target) + # TODO: there might be an issue here with dependencies not being injected this way :/ continue target_dependencies.append(_add_dependency(env, name, _parse_version_spec(version_spec)))