diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f23fc622..061883e03 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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} diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index cc2799910..c1ab2d3eb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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 diff --git a/src/include/kompute/Shader.hpp b/src/include/kompute/Shader.hpp index 1e14091ac..d670d63a7 100644 --- a/src/include/kompute/Shader.hpp +++ b/src/include/kompute/Shader.hpp @@ -4,7 +4,7 @@ #include #include -#if USE_EXTERNAL_SHADER +#ifdef USE_EXTERNAL_GLSLANG #include #else #include