Merge pull request #200 from unexploredtest/fix_glslang_include

Fix #include <SPIRV/GlslangToSpv.h>
This commit is contained in:
Alejandro Saucedo 2021-04-01 15:21:07 +01:00 committed by GitHub
commit 33b6a29783
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 0 deletions

View file

@ -88,6 +88,12 @@ if(KOMPUTE_OPT_CODE_COVERAGE)
${CODECOV_DIR}html/)
endif()
# If glslang is cloned, then SPIRV/GlslangToSpv.h will be used instead of glslang/SPIRV/GlslangToSpv.h
# As after installation, SPIRV/ header files will be found in glslang/SPIRV/ , more info in #193
if(KOMPUTE_OPT_REPO_SUBMODULE_BUILD)
add_definitions(-DUSE_EXTERNAL_GLSLANG)
endif()
# Allow scripts to call main kompute Makefile
function(kompute_make KOMPUTE_MAKE_TARGET)
add_custom_target(${KOMPUTE_MAKE_TARGET}

View file

@ -729,7 +729,12 @@ extern py::object kp_debug, kp_info, kp_warning, kp_error;
#include <iostream>
#include <vector>
#ifdef USE_EXTERNAL_GLSLANG
#include <SPIRV/GlslangToSpv.h>
#else
#include <glslang/SPIRV/GlslangToSpv.h>
#endif
#include <glslang/Include/ResourceLimits.h>
#include <glslang/Public/ShaderLang.h>

View file

@ -4,7 +4,12 @@
#include <iostream>
#include <vector>
#ifdef USE_EXTERNAL_GLSLANG
#include <SPIRV/GlslangToSpv.h>
#else
#include <glslang/SPIRV/GlslangToSpv.h>
#endif
#include <glslang/Include/ResourceLimits.h>
#include <glslang/Public/ShaderLang.h>