Added option for ImGui recipe to build from a docking build and to provide backends to compile via options.

This commit is contained in:
2025-03-02 16:00:48 +01:00
parent 42dada23c9
commit c994752c32
2 changed files with 28 additions and 9 deletions

View File

@@ -71,7 +71,11 @@ def _git_recipe(env: Environment, globals: dict, repo_name, repo_url, cook_fn, v
def _versions(env: Environment, update: bool = False, options: dict = {}):
if 'ref' in options:
return [(0, 0, 0)] # no versions if compiling from a branch
pattern = _tag_pattern(env)
pattern_signature = inspect.signature(_tag_pattern)
kwargs = {}
if 'options' in pattern_signature.parameters:
kwargs['options'] = options
pattern = _tag_pattern(env, **kwargs)
if pattern:
tags = env.GitTags(repo_name = _repo_name(env), remote_url = _repo_url(env), force_fetch=update)
result = []
@@ -94,7 +98,11 @@ def _git_recipe(env: Environment, globals: dict, repo_name, repo_url, cook_fn, v
if 'ref' in options:
git_ref = options['ref']
elif tag_fn:
git_ref = f'refs/tags/{tag_fn(version)}'
tag_signature = inspect.signature(tag_fn)
kwargs = {}
if 'options' in tag_signature.parameters:
kwargs['options'] = options
git_ref = f'refs/tags/{tag_fn(version, **kwargs)}'
else:
assert ref_fn
git_ref = ref_fn(env, version)