Added recipe for json and updated yaml-cpp recipe.
This commit is contained in:
parent
c461b5da39
commit
1e4bb17251
22
recipes/json/recipe.py
Normal file
22
recipes/json/recipe.py
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
|
||||||
|
|
||||||
|
import re
|
||||||
|
from SCons.Script import *
|
||||||
|
|
||||||
|
|
||||||
|
def _git_cook(env: Environment, repo: dict) -> dict:
|
||||||
|
checkout_root = repo['checkout_root']
|
||||||
|
build_result = env.CMakeProject(project_root=checkout_root)
|
||||||
|
return {
|
||||||
|
'CPPPATH': build_result['CPPPATH']
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
env.GitRecipe(
|
||||||
|
globals = globals(),
|
||||||
|
repo_name = 'json',
|
||||||
|
repo_url = 'https://github.com/nlohmann/json.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
|
||||||
|
)
|
@ -19,7 +19,7 @@ def _git_cook(env: Environment, repo: dict) -> dict:
|
|||||||
env.GitRecipe(
|
env.GitRecipe(
|
||||||
globals = globals(),
|
globals = globals(),
|
||||||
repo_name = 'yaml-cpp',
|
repo_name = 'yaml-cpp',
|
||||||
repo_url = 'https://github.com/jbeder/yaml-cpp',
|
repo_url = 'https://github.com/jbeder/yaml-cpp.git',
|
||||||
tag_pattern = re.compile(r'^yaml-cpp-([0-9]+)\.([0-9]+)\.([0-9]+)$'),
|
tag_pattern = re.compile(r'^yaml-cpp-([0-9]+)\.([0-9]+)\.([0-9]+)$'),
|
||||||
tag_fn = lambda version: f'yaml-cpp-{version[0]}.{version[1]}.{version[2]}',
|
tag_fn = lambda version: f'yaml-cpp-{version[0]}.{version[1]}.{version[2]}',
|
||||||
cook_fn = _git_cook
|
cook_fn = _git_cook
|
||||||
|
Loading…
x
Reference in New Issue
Block a user