vcpkg/ports/onnx/fix-dependency-protobuf.patch
MonicaLiu 88a0bf87b5
[onnx] Update onnx to 1.16.2 and fix downstream (#40067)
Co-authored-by: Monica <v-liumonica@microsoft.com>
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2024-10-17 21:24:02 -07:00

13 lines
551 B
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index d81ac1d..9f97998 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -149,6 +149,7 @@ if(ONNX_BUILD_TESTS)
set(googletest_STATIC_LIBRARIES GTest::gtest)
endif()
+find_package(protobuf CONFIG REQUIRED)
if((ONNX_USE_LITE_PROTO AND TARGET protobuf::libprotobuf-lite) OR ((NOT ONNX_USE_LITE_PROTO) AND TARGET protobuf::libprotobuf))
# Sometimes we need to use protoc compiled for host architecture while linking
# libprotobuf against target architecture. See https://github.com/caffe2/caffe