From cb7fb0a1c5c89f0b062f7330ab2dd32871f7ceec Mon Sep 17 00:00:00 2001 From: Ivan Avdeev Date: Mon, 7 Jun 2021 09:55:33 -0700 Subject: [PATCH] ref_vk: attempt to fix win32 glslc path --- ref_vk/wscript | 9 +++++---- scripts/waifulib/glslc.py | 6 +++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ref_vk/wscript b/ref_vk/wscript index 0e67741e..22a35143 100644 --- a/ref_vk/wscript +++ b/ref_vk/wscript @@ -26,17 +26,18 @@ def configure(conf): if not conf.env.VK: return - conf.load('glslc') - conf.define('REF_DLL', 1) - if conf.env.DEST_OS == 'win32': conf.start_msg('Vulkan SDK available?') if not 'VULKAN_SDK' in conf.environ: - Logs.warn('VULKAN_SDK environment variable is not available, ref_vk will not be built') + conf.error('VULKAN_SDK environment variable is not available, ref_vk will not be built') conf.end_msg('no') conf.env.VULKAN_SDK = conf.environ['VULKAN_SDK'] conf.end_msg('found at ' + conf.env.VULKAN_SDK) + conf.load('glslc') + + conf.define('REF_DLL', 1) + if conf.options.NSIGHT_AFTERMATH_SDK: conf.start_msg('Nvidia Nsight Aftermath SDK') conf.env.HAVE_AFTERMATH = 1 diff --git a/scripts/waifulib/glslc.py b/scripts/waifulib/glslc.py index 70ec2b7c..b6ddcb5a 100644 --- a/scripts/waifulib/glslc.py +++ b/scripts/waifulib/glslc.py @@ -6,7 +6,11 @@ from waflib import * from waflib.Tools import c_preproc, ccroot def configure(conf): - conf.find_program('glslc') + if conf.env.DEST_OS == 'win32': + conf.find_program('glslc', path_list=[os.path.join(conf.env.VULKAN_SDK, 'Bin')]) + else: + conf.find_program('glslc') + conf.add_os_flags('GLSLCPPFLAGS', dup=False) conf.add_os_flags('GLSLCFLAGS', dup=False)