Added recipe for tinyobjloader.
This commit is contained in:
parent
fe8f329b38
commit
c74fbb8798
24
recipes/tinyobjloader/recipe.py
Normal file
24
recipes/tinyobjloader/recipe.py
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
|
||||||
|
|
||||||
|
import re
|
||||||
|
from SCons.Script import *
|
||||||
|
|
||||||
|
|
||||||
|
def _git_cook(env: Environment, repo: dict) -> dict:
|
||||||
|
checkout_root = repo['checkout_root']
|
||||||
|
build_result = env.CMakeProject(checkout_root)
|
||||||
|
|
||||||
|
return {
|
||||||
|
'CPPPATH': build_result['CPPPATH'],
|
||||||
|
'LIBS': [env.FindLib('tinyobjloader', paths=build_result['LIBPATH'])]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
env.GitRecipe(
|
||||||
|
globals = globals(),
|
||||||
|
repo_name = 'tinyobjloader',
|
||||||
|
repo_url = 'https://github.com/tinyobjloader/tinyobjloader.git',
|
||||||
|
tag_pattern = re.compile(r'^v([0-9]+)\.([0-9]+)\.([0-9]+)$'),
|
||||||
|
tag_fn = lambda version: f'v{version[0]}.{version[1]}.{version[2]}',
|
||||||
|
cook_fn = _git_cook
|
||||||
|
)
|
Loading…
x
Reference in New Issue
Block a user