Added recipes for Glslang and GLM.
This commit is contained in:
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']
|
||||
}
|
||||
Reference in New Issue
Block a user