Update to new recipe system (S++ 2.0).
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
|
||||
import os
|
||||
import platform
|
||||
import re
|
||||
from SCons.Script import *
|
||||
|
||||
def cook(env: Environment, git_ref: str = "main") -> dict:
|
||||
repo = env.GitBranch(repo_name = 'SDL', remote_url = 'https://github.com/libsdl-org/SDL.git', git_ref = git_ref)
|
||||
|
||||
def _git_cook(env: Environment, repo: dict) -> dict:
|
||||
checkout_root = repo['checkout_root']
|
||||
build_result = env.CMakeProject(project_root=checkout_root, generate_args = ['-DSDL_STATIC=ON', '-DSDL_SHARED=OFF'])
|
||||
libs = []
|
||||
@@ -25,3 +25,13 @@ def cook(env: Environment, git_ref: str = "main") -> dict:
|
||||
'LIBS': libs
|
||||
}
|
||||
|
||||
|
||||
env.GitRecipe(
|
||||
globals = globals(),
|
||||
repo_name = 'SDL',
|
||||
repo_url = 'https://github.com/libsdl-org/SDL.git',
|
||||
tag_pattern = re.compile(r'^release-([0-9]+)\.([0-9]+)\.([0-9]+)$'),
|
||||
tag_fn = lambda version: f'release-{version[0]}.{version[1]}.{version[2]}',
|
||||
cook_fn = _git_cook
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user