Skip to content

Commit 17d2502

Browse files
committed
VkConvertUBOToPushConstantsTest initial commit.
1 parent 50c97a6 commit 17d2502

File tree

13 files changed

+731
-1
lines changed

13 files changed

+731
-1
lines changed

Tests/DiligentCoreAPITest/CMakeLists.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,21 @@ if(EXISTS "${DILIGENT_NVAPI_PATH}/nvapi.h")
151151
target_compile_definitions(DiligentCoreAPITest PUBLIC DILIGENT_ENABLE_D3D_NVAPI)
152152
endif()
153153

154+
# Add SPIRV-Tools include directories if needed for SPIRVTools.hpp
155+
# Test files that include SPIRVTools.hpp need access to spirv-tools headers
156+
# SPIRVTools.hpp includes "spirv-tools/libspirv.h", so we need the include directory
157+
if (TARGET SPIRV-Tools-opt)
158+
get_target_property(SPIRV_TOOLS_SOURCE_DIR SPIRV-Tools-opt SOURCE_DIR)
159+
get_target_property(SPIRV_TOOLS_BINARY_DIR SPIRV-Tools-opt BINARY_DIR)
160+
get_filename_component(SPIRV_TOOLS_ROOT_DIR "${SPIRV_TOOLS_SOURCE_DIR}/../.." ABSOLUTE)
161+
get_filename_component(SPIRV_TOOLS_ROOT_BINARY_DIR "${SPIRV_TOOLS_BINARY_DIR}/../.." ABSOLUTE)
162+
# Add include subdirectory for public headers like spirv-tools/libspirv.h
163+
target_include_directories(DiligentCoreAPITest PRIVATE
164+
${SPIRV_TOOLS_ROOT_DIR}/include
165+
${SPIRV_TOOLS_ROOT_DIR}
166+
${SPIRV_TOOLS_ROOT_BINARY_DIR}
167+
)
168+
endif()
154169

155170
set_target_properties(DiligentCoreAPITest
156171
PROPERTIES

0 commit comments

Comments
 (0)