Trying to add it in the first cmakelists

This commit is contained in:
aliPMPAINT 2021-03-31 11:19:31 +04:30
parent 2e9239d60e
commit 59a02751e4
3 changed files with 6 additions and 6 deletions

View file

@ -88,6 +88,11 @@ if(KOMPUTE_OPT_CODE_COVERAGE)
${CODECOV_DIR}html/)
endif()
# If glslag was cloned, then SPIRV/GlslangToSpv.h will be used instead of glslang/SPIRV/GlslangToSpv.h
if(KOMPUTE_OPT_REPO_SUBMODULE_BUILD)
add_compile_definitions(USE_EXTERNAL_GLSLANG)
endif()
# Allow scripts to call main kompute Makefile
function(kompute_make KOMPUTE_MAKE_TARGET)
add_custom_target(${KOMPUTE_MAKE_TARGET}

View file

@ -145,11 +145,6 @@ endif()
#################### GLSLANG #######################
#####################################################
# If glslag was cloned, then SPIRV/GlslangToSpv.h will be used instead of glslang/SPIRV/GlslangToSpv.h
if(KOMPUTE_OPT_REPO_SUBMODULE_BUILD)
add_compile_definitions(USE_EXTERNAL_SHADER=1)
endif()
if(NOT KOMPUTE_OPT_DISABLE_SHADER_UTILS)
if(KOMPUTE_OPT_REPO_SUBMODULE_BUILD)
add_subdirectory(${PROJECT_SOURCE_DIR}/external/glslang

View file

@ -4,7 +4,7 @@
#include <iostream>
#include <vector>
#if USE_EXTERNAL_SHADER
#ifdef USE_EXTERNAL_GLSLANG
#include <SPIRV/GlslangToSpv.h>
#else
#include <glslang/SPIRV/GlslangToSpv.h>