From 59a02751e49c5a77fc5f9268bca18581605b73b0 Mon Sep 17 00:00:00 2001 From: aliPMPAINT Date: Wed, 31 Mar 2021 11:19:31 +0430 Subject: [PATCH] Trying to add it in the first cmakelists --- CMakeLists.txt | 5 +++++ src/CMakeLists.txt | 5 ----- src/include/kompute/Shader.hpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) 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