Check for ENABLE_SPVREMAPPER flag in CMakeList files.

There is a flag to disable the SPVRemapper during the GLSLang build.
That flag is check in some, but not all spots so if you try to build
with SPVRemapper disabled you get CMake errors and compile errors.

This CL fixs up the build so building with -DENABLE_SPVREMAPPER=0 will
complete correclty.
This commit is contained in:
Dan Sinclair
2019-11-21 10:33:32 -05:00
parent f4d4668529
commit 04567eb232
3 changed files with 35 additions and 18 deletions

View File

@@ -20,10 +20,12 @@ if(BUILD_TESTING)
${CMAKE_CURRENT_SOURCE_DIR}/Link.FromFile.cpp
${CMAKE_CURRENT_SOURCE_DIR}/Link.FromFile.Vk.cpp
${CMAKE_CURRENT_SOURCE_DIR}/Pp.FromFile.cpp
${CMAKE_CURRENT_SOURCE_DIR}/Spv.FromFile.cpp
${CMAKE_CURRENT_SOURCE_DIR}/Spv.FromFile.cpp)
# -- Remapper tests
${CMAKE_CURRENT_SOURCE_DIR}/Remap.FromFile.cpp)
if(ENABLE_SPVREMAPPER)
set(TEST_SOURCES ${TEST_SOURCES}
${CMAKE_CURRENT_SOURCE_DIR}/Remap.FromFile.cpp)
endif()
glslang_pch(TEST_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/pch.cpp)
@@ -49,8 +51,13 @@ if(BUILD_TESTING)
${gtest_SOURCE_DIR}/include)
set(LIBRARIES
SPVRemapper glslang OSDependent OGLCompiler glslang
glslang OSDependent OGLCompiler glslang
SPIRV glslang-default-resource-limits)
if(ENABLE_SPVREMAPPER)
set(LIBRARIES ${LIBRARIES} SPVRemapper)
endif()
if(ENABLE_HLSL)
set(LIBRARIES ${LIBRARIES} HLSL)
endif(ENABLE_HLSL)