Automatically apply patch when compiling SDL3.
This commit is contained in:
18
SConscript
18
SConscript
@@ -119,6 +119,14 @@ def _inject_dependency(dependency, kwargs: dict, add_sources: bool = True) -> No
|
||||
_inject_list(kwargs, dependency.cook_result, 'LIBS')
|
||||
for depdep in dependency.depdeps:
|
||||
_inject_dependency(depdep, kwargs)
|
||||
elif isinstance(dependency, _Target):
|
||||
_inject_list(kwargs, dependency.kwargs, 'CPPPATH')
|
||||
_inject_list(kwargs, dependency.kwargs, 'CPPDEFINES')
|
||||
_inject_list(kwargs, dependency.kwargs, 'LIBPATH')
|
||||
_inject_list(kwargs, dependency.kwargs, 'LIBS')
|
||||
_inject_list(kwargs, {'LIBS': [dependency]}, 'LIBS')
|
||||
for depdep in dependency.dependencies:
|
||||
_inject_dependency(depdep, kwargs)
|
||||
|
||||
def _rglob(env: Environment, root_path: str, pattern: str, **kwargs):
|
||||
result_nodes = []
|
||||
@@ -335,10 +343,11 @@ def _wrap_builder(builder, target_type: TargetType):
|
||||
if version_spec == {}:
|
||||
dep_target = _find_target(env, name)
|
||||
if dep_target is not None and dep_target.target_type == TargetType.LIBRARY:
|
||||
if 'LIBS' in kwargs:
|
||||
kwargs['LIBS'].append(dep_target)
|
||||
else:
|
||||
kwargs['LIBS'] = [dep_target]
|
||||
#if 'LIBS' in kwargs:
|
||||
# kwargs['LIBS'].append(dep_target)
|
||||
#else:
|
||||
# kwargs['LIBS'] = [dep_target]
|
||||
target_dependencies.append(dep_target)
|
||||
continue
|
||||
target_dependencies.append(_add_dependency(env, name, _parse_version_spec(version_spec)))
|
||||
|
||||
@@ -747,6 +756,7 @@ env.Append(CPPDEFINES = [])
|
||||
env.Append(LINKFLAGS = [])
|
||||
|
||||
# init SPP environment variables
|
||||
env['SPP_DIR'] = _spp_dir.abspath
|
||||
env['SPP_TARGETS'] = []
|
||||
env['SPP_DEFAULT_TARGETS'] = []
|
||||
env['SPP_TARGET_DEPENDENCIES'] = []
|
||||
|
||||
Reference in New Issue
Block a user