Skip to content

Commit

Permalink
[vcpkg baseline][onnx] Fix find dependency protobuf (#23411)
Browse files Browse the repository at this point in the history
* [onnx] Fix find dependency protobuf

* version
  • Loading branch information
JackBoosY authored Mar 7, 2022
1 parent bd60227 commit 54de402
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 1 deletion.
12 changes: 12 additions & 0 deletions ports/onnx/fix-dependency-protobuf.patch
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions ports/onnx/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions ports/onnx/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -4958,7 +4958,7 @@
},
"onnx": {
"baseline": "1.10.2",
"port-version": 0
"port-version": 1
},
"onnx-optimizer": {
"baseline": "0.2.6",
Expand Down
5 changes: 5 additions & 0 deletions versions/o-/onnx.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "62ee0b78332273115540d669065a467314aace3a",
"version-semver": "1.10.2",
"port-version": 1
},
{
"git-tree": "a83605bd84787898f92ada1bf1874e162a441c10",
"version-semver": "1.10.2",
Expand Down

0 comments on commit 54de402

Please sign in to comment.