forked from MoonsideGames/Refresh
Update CMakeLists for SPIRV-Cross
parent
632bd58613
commit
973923e84d
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue