From 973923e84da676ceaea6a5451d84a37382e4d0f3 Mon Sep 17 00:00:00 2001 From: Caleb Cornett Date: Mon, 14 Mar 2022 15:12:29 -0400 Subject: [PATCH] Update CMakeLists for SPIRV-Cross --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 217e92f..31286a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 $ $ $ + $ ) # 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")