From 2d5e64458d52042af8773fd13f467eba87eaeb26 Mon Sep 17 00:00:00 2001 From: Niklas Date: Sat, 21 May 2022 22:51:16 +0200 Subject: [PATCH] add distinction netween windows and linux for spir-v compiler (validator) run --- CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dcbeb69..22090d9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,8 +20,14 @@ configure_file(./shaders/opengl/FragmentShader.glsl ./opengl/FragmentShader.glsl configure_file(./shaders/vulkan/ComputeShader.comp ./vulkan/ComputeShader.comp COPYONLY) configure_file("shaders/vulkan/VertexShader.vert" ./vulkan/VertexShader.vert COPYONLY) configure_file("shaders/vulkan/FragmentShader.frag" ./vulkan/FragmentShader.frag COPYONLY) -configure_file(shaders/vulkan/runCompiler.sh ./vulkan/runCompiler.sh COPYONLY) -execute_process(COMMAND sh runCompiler.sh WORKING_DIRECTORY ./vulkan) + +IF (DEFINED WINDOWS) + configure_file(./shaders/vulkan/runCompiler.bat ./vulkan/runCompiler.bat COPYONLY) + execute_process(COMMAND runCompiler.bat WORKING_DIRECTORY ./vulkan) +ELSE() + configure_file(shaders/vulkan/runCompiler.sh ./vulkan/runCompiler.sh COPYONLY) + execute_process(COMMAND sh runCompiler.sh WORKING_DIRECTORY ./vulkan) +ENDIF() # Vulkan IF (NOT DEFINED WINDOWS)