wscript: support static linking of shaderc

These idiots have no idea how to design a library, so we’ll have
to work around their bullshit for now.
This commit is contained in:
Martin Herkt 2017-12-24 20:11:27 +01:00
parent a721dac601
commit 79b9f48353
No known key found for this signature in database
GPG Key ID: C24B9CD04DC6AE7F
1 changed files with 16 additions and 1 deletions

17
wscript
View File

@ -728,10 +728,25 @@ video_output_features = [
'desc': 'Direct3D support',
'deps': 'win32-desktop && gpl',
'func': check_cc(header_name='d3d9.h'),
}, {
'name': 'shaderc-shared',
'desc': 'libshaderc SPIR-V compiler (shared library)',
'deps': '!static-build',
'groups': ['shaderc'],
'func': check_cc(header_name='shaderc/shaderc.h', lib='shaderc_shared'),
}, {
'name': 'shaderc-static',
'desc': 'libshaderc SPIR-V compiler (static library)',
'deps': '!shaderc-shared',
'groups': ['shaderc'],
'func': check_cc(header_name='shaderc/shaderc.h',
lib=['shaderc_combined', 'glslang', 'SPIRV-Tools',
'SPIRV-Tools-opt', 'stdc++']),
}, {
'name': '--shaderc',
'desc': 'libshaderc SPIR-V compiler',
'func': check_cc(header_name='shaderc/shaderc.h', lib='shaderc_shared'),
'deps': 'shaderc-shared || shaderc-static',
'func': check_true,
}, {
'name': '--crossc',
'desc': 'libcrossc SPIR-V translator',