From 9e451d601c4ef401ca3d2856c2792300f503e3ed Mon Sep 17 00:00:00 2001 From: Florent Castelli Date: Fri, 20 Jan 2017 17:50:44 +0100 Subject: [PATCH] cmake: Fix glslang on Windows --- Externals/glslang/CMakeLists.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Externals/glslang/CMakeLists.txt b/Externals/glslang/CMakeLists.txt index 4ea45b5906..8b8fb5180e 100644 --- a/Externals/glslang/CMakeLists.txt +++ b/Externals/glslang/CMakeLists.txt @@ -27,7 +27,7 @@ set(SRCS glslang/MachineIndependent/ShaderLang.cpp glslang/MachineIndependent/SymbolTable.cpp glslang/MachineIndependent/Versions.cpp - glslang/OSDependent/Unix/ossource.cpp + hlsl/hlslGrammar.cpp hlsl/hlslOpMap.cpp hlsl/hlslParseables.cpp @@ -44,6 +44,13 @@ set(SRCS SPIRV/SPVRemapper.cpp ) +if(WIN32) + list(APPEND SRCS glslang/OSDependent/Windows/ossource.cpp) +else() + list(APPEND SRCS glslang/OSDependent/Unix/ossource.cpp) +endif() + +if(NOT MSVC) # glslang requires C++11 at a minimum to compile. add_definitions(-std=c++11) @@ -53,6 +60,6 @@ add_definitions(-Wno-reorder) add_definitions(-Wno-sign-compare) add_definitions(-Wno-parentheses) add_definitions(-Wno-unused-variable) +endif() add_library(glslang STATIC ${SRCS}) -