diff --git a/ports/onnx/fix-dependency-protobuf.patch b/ports/onnx/fix-dependency-protobuf.patch index 603f58770ffcf5..c435922d0103d6 100644 --- a/ports/onnx/fix-dependency-protobuf.patch +++ b/ports/onnx/fix-dependency-protobuf.patch @@ -10,3 +10,19 @@ index d81ac1d..9f97998 100644 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/cmake/ONNXConfig.cmake.in b/cmake/ONNXConfig.cmake.in +index d588f8a..dbd4398 100644 +--- a/cmake/ONNXConfig.cmake.in ++++ b/cmake/ONNXConfig.cmake.in +@@ -6,9 +6,8 @@ + # library version information + set(ONNX_VERSION "@ONNX_VERSION@") + +-list(APPEND CMAKE_PREFIX_PATH "@PROTOBUF_DIR@") +-set(Protobuf_INCLUDE_DIR "@PROTOBUF_INCLUDE_DIR@") +-find_package(Protobuf REQUIRED) ++include(CMakeFindDependencyMacro) ++find_dependency(protobuf CONFIG) + + # import targets + include ("${CMAKE_CURRENT_LIST_DIR}/ONNXTargets.cmake") diff --git a/ports/onnx/portfile.cmake b/ports/onnx/portfile.cmake index 9cab0c6f3d6bc9..668425d3223791 100644 --- a/ports/onnx/portfile.cmake +++ b/ports/onnx/portfile.cmake @@ -64,10 +64,6 @@ vcpkg_cmake_install() vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/ONNX) vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") -vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/${PORT}/ONNXConfig.cmake" "# import targets" -[[# import targets -include(CMakeFindDependencyMacro) -find_dependency(protobuf CONFIG)]]) file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" diff --git a/ports/onnx/vcpkg.json b/ports/onnx/vcpkg.json index f2386a485f4918..ada26a3f2694f1 100644 --- a/ports/onnx/vcpkg.json +++ b/ports/onnx/vcpkg.json @@ -1,6 +1,7 @@ { "name": "onnx", "version-semver": "1.16.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 5b0981937a2951..c4562173d89515 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6610,7 +6610,7 @@ }, "onnx": { "baseline": "1.16.2", - "port-version": 0 + "port-version": 1 }, "onnx-optimizer": { "baseline": "0.3.19", diff --git a/versions/o-/onnx.json b/versions/o-/onnx.json index 5914427a3a7b4b..494dd57dbdf0d3 100644 --- a/versions/o-/onnx.json +++ b/versions/o-/onnx.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "262df4daa9534c3c514b1a4f7c048369b575568f", + "version-semver": "1.16.2", + "port-version": 1 + }, { "git-tree": "57d8f77c2964232239ba10b3f2ebf16698486d9a", "version-semver": "1.16.2",