Update CMakeLists to include SPIRV-Cross
continuous-integration/drone/pr Build is failing Details

Caleb Cornett 2022-03-14 19:07:26 -04:00
parent 05d200c7fa
commit 25847c38a2
1 changed files with 8 additions and 0 deletions

View File

@ -39,10 +39,13 @@ endif()
# Defines
add_definitions(
-DREFRESH_DRIVER_VULKAN
-DSPIRV_CROSS_C_API_GLSL
-DSPIRV_CROSS_C_API_REFLECT
)
if (WIN32)
add_definitions(
-DREFRESH_DRIVER_D3D11
-DSPIRV_CROSS_C_API_HLSL
)
endif()
@ -72,6 +75,7 @@ target_include_directories(Refresh PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Vulkan-Headers/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/SPIRV-Cross>
)
# MinGW builds should statically link libgcc
@ -85,6 +89,10 @@ set_target_properties(Refresh PROPERTIES OUTPUT_NAME "Refresh"
SOVERSION ${LIB_MAJOR_VERSION}
)
# Internal Dependencies
add_subdirectory(SPIRV-Cross EXCLUDE_FROM_ALL)
target_link_libraries(Refresh PRIVATE spirv-cross-c)
# SDL2 Dependency
if (DEFINED SDL2_INCLUDE_DIRS AND DEFINED SDL2_LIBRARIES)
message(STATUS "using pre-defined SDL2 variables SDL2_INCLUDE_DIRS and SDL2_LIBRARIES")