Added recipes for Glslang and GLM.
This commit is contained in:
parent
93dd09e324
commit
7050ec5e43
@ -27,6 +27,7 @@ def cook(env: Environment, project_root: str, generate_args: 'list[str]' = [], b
|
|||||||
pathlib.Path(install_dir, _BUILT_STAMPFILE).touch()
|
pathlib.Path(install_dir, _BUILT_STAMPFILE).touch()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
'install_dir': install_dir,
|
||||||
'LIBPATH': [os.path.join(install_dir, 'lib')],
|
'LIBPATH': [os.path.join(install_dir, 'lib')],
|
||||||
'CPPPATH': [os.path.join(install_dir, 'include')]
|
'CPPPATH': [os.path.join(install_dir, 'include')]
|
||||||
}
|
}
|
||||||
|
11
recipes/glm/recipe.py
Normal file
11
recipes/glm/recipe.py
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
import os
|
||||||
|
from SCons.Script import *
|
||||||
|
|
||||||
|
def cook(env: Environment, git_ref: str = "master") -> dict:
|
||||||
|
repo = env.Cook('GitBranch', repo_name = 'glm', remote_url = 'https://github.com/g-truc/glm.git', git_ref = git_ref)
|
||||||
|
checkout_root = repo['checkout_root']
|
||||||
|
|
||||||
|
return {
|
||||||
|
'CPPPATH': [checkout_root],
|
||||||
|
}
|
23
recipes/glslang/recipe.py
Normal file
23
recipes/glslang/recipe.py
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
|
||||||
|
from SCons.Script import *
|
||||||
|
|
||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
|
||||||
|
def cook(env: Environment, remote: str = 'github', git_ref: str = '') -> dict:
|
||||||
|
if remote == 'mewin':
|
||||||
|
repo = env.Cook('GitBranch', repo_name = 'glslang_mewin', remote_url = 'https://git.mewin.de/mewin/glslang.git', git_ref = git_ref or 'master')
|
||||||
|
else:
|
||||||
|
repo = env.Cook('GitBranch', repo_name = 'glslang', remote_url = 'https://github.com/KhronosGroup/glslang.git', git_ref = git_ref or 'main')
|
||||||
|
checkout_root = repo['checkout_root']
|
||||||
|
|
||||||
|
# TODO: windows?
|
||||||
|
subprocess.run(('/usr/bin/env', 'python3', 'update_glslang_sources.py'), cwd=checkout_root, stdout=sys.stdout, stderr=sys.stderr, check=True)
|
||||||
|
build_result = env.Cook('CMakeProject', project_root=checkout_root, generate_args = ['-DBUILD_TESTING=OFF'])
|
||||||
|
|
||||||
|
return {
|
||||||
|
'LIBPATH': [os.path.join(build_result['install_dir'], 'glslang')],
|
||||||
|
'CPPPATH': build_result['CPPPATH'],
|
||||||
|
'LIBS': ['glslang', 'glslang-default-resource-limits', 'MachineIndependent']
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user