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