From 79b9f483539db9b8e9245f42f778a050549ab01e Mon Sep 17 00:00:00 2001 From: Martin Herkt Date: Sun, 24 Dec 2017 20:11:27 +0100 Subject: wscript: support static linking of shaderc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These idiots have no idea how to design a library, so we’ll have to work around their bullshit for now. --- wscript | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/wscript b/wscript index 8713cc904a..750ce3bd1f 100644 --- a/wscript +++ b/wscript @@ -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', -- cgit v1.2.3