Added libbacktrace and recursive dependencies.

This commit is contained in:
2023-11-11 12:42:21 +01:00
parent 0abc33d6f8
commit 3cac31bd81
3 changed files with 58 additions and 2 deletions

View File

@@ -4,9 +4,11 @@ import os
def _cook(env: Environment, recipe_name: str, *args, **kwargs):
import importlib.util
source_file = None
for folder in env['RECIPES_FOLDERS']:
source_file = f'{folder.abspath}/{recipe_name}/recipe.py'
if os.path.exists(source_file):
try_source_file = f'{folder.abspath}/{recipe_name}/recipe.py'
if os.path.exists(try_source_file):
source_file = try_source_file
break
if not source_file:
raise Exception(f'Could not find recipe {recipe_name}.')
@@ -34,6 +36,9 @@ def _inject_dependency(dependency, kwargs: dict) -> None:
_inject_list(kwargs, dependency, 'CPPDEFINES')
_inject_list(kwargs, dependency, 'LIBPATH')
_inject_list(kwargs, dependency, 'LIBS')
if 'DEPENDENCIES' in dependency:
for inner_dependency in dependency['DEPENDENCIES']:
_inject_dependency(inner_dependency, kwargs)
def _rglob(env: Environment, root_path: str, pattern: str, **kwargs):
result_nodes = []