From 54de40278a1b07c56a55b5f6b03c0f8919b69260 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jack=C2=B7Boos=C2=B7Yu?= <47264268+JackBoosY@users.noreply.github.com> Date: Tue, 8 Mar 2022 02:58:06 +0800 Subject: [PATCH] [vcpkg baseline][onnx] Fix find dependency protobuf (#23411) * [onnx] Fix find dependency protobuf * version --- ports/onnx/fix-dependency-protobuf.patch | 12 ++++++++++++ ports/onnx/portfile.cmake | 1 + ports/onnx/vcpkg.json | 1 + versions/baseline.json | 2 +- versions/o-/onnx.json | 5 +++++ 5 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 ports/onnx/fix-dependency-protobuf.patch diff --git a/ports/onnx/fix-dependency-protobuf.patch b/ports/onnx/fix-dependency-protobuf.patch new file mode 100644 index 0000000000..6ccdac6650 --- /dev/null +++ b/ports/onnx/fix-dependency-protobuf.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1295eab..0fb9f17 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -126,6 +126,7 @@ if(ONNX_BUILD_TESTS) + include(googletest) + 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 diff --git a/ports/onnx/portfile.cmake b/ports/onnx/portfile.cmake index 61c36b56f2..8070f6dd9f 100644 --- a/ports/onnx/portfile.cmake +++ b/ports/onnx/portfile.cmake @@ -7,6 +7,7 @@ vcpkg_from_github( SHA512 7519d326cd2b2b13a269ec0d01af07c32115d183dae6e1eaae55f5b23b6c92b2aadbb2b1e555557f4201bbcf921fa563d09d45d7f1d3bd2399c1a94a6ef63303 PATCHES fix-cmakelists.patch + fix-dependency-protobuf.patch ) string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" USE_STATIC_RUNTIME) diff --git a/ports/onnx/vcpkg.json b/ports/onnx/vcpkg.json index 069934dd73..2eaace7ced 100644 --- a/ports/onnx/vcpkg.json +++ b/ports/onnx/vcpkg.json @@ -1,6 +1,7 @@ { "name": "onnx", "version-semver": "1.10.2", + "port-version": 1, "description": "Open standard for machine learning interoperability", "homepage": "https://onnx.ai", "license": "Apache-2.0", diff --git a/versions/baseline.json b/versions/baseline.json index 9eee1d13bb..8c9d31e98d 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4958,7 +4958,7 @@ }, "onnx": { "baseline": "1.10.2", - "port-version": 0 + "port-version": 1 }, "onnx-optimizer": { "baseline": "0.2.6", diff --git a/versions/o-/onnx.json b/versions/o-/onnx.json index de8a62fc6f..a61d8ee3f3 100644 --- a/versions/o-/onnx.json +++ b/versions/o-/onnx.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "62ee0b78332273115540d669065a467314aace3a", + "version-semver": "1.10.2", + "port-version": 1 + }, { "git-tree": "a83605bd84787898f92ada1bf1874e162a441c10", "version-semver": "1.10.2",