From a74817ab10fa2da33521e67910ee0103abc50621 Mon Sep 17 00:00:00 2001 From: Yulong Wang <7679871+fs-eire@users.noreply.github.com> Date: Fri, 10 Jan 2025 18:07:12 -0800 Subject: [PATCH] add missing build dependency for onnxruntime_providers_webgpu (#23324) ### Description Fixes build when specify with flag `--target onnxruntime_providers_webgpu` Otherwise the following error will occur: ``` range.cc D:\code\onnxruntime\build\Windows\Debug\_deps\onnx-src\onnx\onnx_pb.h(65,10): error C1083: Cannot open include file: 'o nnx/onnx-ml.pb.h': No such file or directory [D:\code\onnxruntime\build\Windows\Debug\onnxruntime_providers_webgpu.vcxp roj] (compiling source file '../../../onnxruntime/core/providers/webgpu/math/binary_elementwise_ops.cc') ``` --- cmake/onnxruntime_providers_webgpu.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/onnxruntime_providers_webgpu.cmake b/cmake/onnxruntime_providers_webgpu.cmake index e527d538d8..fb3dc43abc 100644 --- a/cmake/onnxruntime_providers_webgpu.cmake +++ b/cmake/onnxruntime_providers_webgpu.cmake @@ -61,4 +61,5 @@ VERBATIM ) endif() + add_dependencies(onnxruntime_providers_webgpu ${onnxruntime_EXTERNAL_DEPENDENCIES}) set_target_properties(onnxruntime_providers_webgpu PROPERTIES FOLDER "ONNXRuntime")