CMake: add dependency to dawncpp_headers on dawn_common

common/VertexFormatUtils.h includes dawn/webgpu_cpp.h

Change-Id: Id9f56c8d1344467ba84093b5da7d6997e34c1c22
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/50620
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Aleksi Sapon 2021-05-17 16:04:28 +00:00 committed by Commit Bot service account
parent 3148e83cff
commit 58ec60ea23
2 changed files with 4 additions and 1 deletions

View File

@ -72,7 +72,7 @@ if (WIN32)
)
endif()
target_link_libraries(dawn_common PRIVATE dawn_internal_config)
target_link_libraries(dawn_common PUBLIC dawncpp_headers PRIVATE dawn_internal_config)
# TODO Android Log support
# TODO Vulkan headers support

View File

@ -19,6 +19,9 @@
#include <dawn/webgpu_cpp.h>
// TODO(dawn:695): Remove the dawncpp_headers CMake dependency when VertexFormatUtils is deleted,
// assuming no other dependencies have been added in other project files.
namespace dawn {
static constexpr std::array<wgpu::VertexFormat, 30> kAllVertexFormats = {