CMake: Add support with Swiftshader with DAWN_ENABLE_SWIFTSHADER

Change-Id: I2b3d906bac760a22f33104231a6341415cbff3b5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/85365
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez
2022-04-11 16:48:43 +00:00
committed by Dawn LUCI CQ
parent 6efd54e2ae
commit be352ea5b9
3 changed files with 14 additions and 0 deletions

View File

@@ -442,6 +442,10 @@ if (DAWN_ENABLE_OPENGL)
target_link_libraries(dawn_native PRIVATE dawn_khronos_platform)
endif()
if (DAWN_ENABLE_SWIFTSHADER)
target_compile_definitions(dawn_native PRIVATE "DAWN_ENABLE_SWIFTSHADER")
endif()
if (DAWN_ENABLE_VULKAN)
target_sources(dawn_native PRIVATE
"${DAWN_INCLUDE_DIR}/dawn/native/VulkanBackend.h"