Skip to content

Commit

Permalink
[onnx] change protoc search, pb.h generation
Browse files Browse the repository at this point in the history
  • Loading branch information
luncliff committed Jun 27, 2024
1 parent be3006f commit d4f62c5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
6 changes: 5 additions & 1 deletion ports/onnx/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ else()
set(USE_PROTOBUF_SHARED OFF)
endif()

find_program(PROTOC NAMES protoc PATHS "${CURRENT_HOST_INSTALLED_DIR}/tools/protobuf" REQUIRED)
find_program(PROTOC NAMES protoc
PATHS "${CURRENT_HOST_INSTALLED_DIR}/tools/protobuf"
REQUIRED NO_DEFAULT_PATH NO_CMAKE_PATH
)
message(STATUS "Using protoc: ${PROTOC}")

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
Expand Down Expand Up @@ -65,6 +68,7 @@ vcpkg_cmake_configure(
-DPYTHON_EXECUTABLE:FILEPATH=${PYTHON3}
-DProtobuf_PROTOC_EXECUTABLE=${PROTOC}
-DONNX_CUSTOM_PROTOC_EXECUTABLE=${PROTOC}
-DONNX_VERIFY_PROTO3=ON # --protoc_path for gen_proto.py
-DONNX_ML=ON
-DONNX_GEN_PB_TYPE_STUBS=ON
-DONNX_USE_PROTOBUF_SHARED_LIBS=${USE_PROTOBUF_SHARED}
Expand Down
2 changes: 1 addition & 1 deletion ports/onnx/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "onnx",
"version-semver": "1.16.0",
"port-version": 1,
"port-version": 2,
"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 @@ -130,7 +130,7 @@
},
"onnx": {
"baseline": "1.16.0",
"port-version": 1
"port-version": 2
},
"onnxruntime": {
"baseline": "1.18.0",
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": "7da4ed72675423754cd88d6ef4f7f1c0acc4903e",
"version-semver": "1.16.0",
"port-version": 2
},
{
"git-tree": "84056c069b4cc59b487fc92bbcebb5aaa22b7f9b",
"version-semver": "1.16.0",
Expand Down

0 comments on commit d4f62c5

Please sign in to comment.