Skip to content

Commit

Permalink
Ported conda-forge patch to work with latest protobuf (openvinotoolki…
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-lavrenov authored Jan 20, 2024
1 parent 3a70f53 commit efa7e3b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion thirdparty/dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,15 @@ if(ENABLE_OV_PADDLE_FRONTEND OR ENABLE_OV_ONNX_FRONTEND OR ENABLE_OV_TF_FRONTEND
# otherwise, fallback to existing default
find_package(Protobuf 3.20.3 REQUIRED ${protobuf_config})
endif()
set(PROTOC_EXECUTABLE protobuf::protoc)

# with newer protobuf versions (4.22 and newer), we use CONFIG first
# so, the Protobuf_PROTOC_EXECUTABLE variable must be checked explicitly,
# because it's not used in this case (oppositely to MODULE case)
if(Protobuf_VERSION VERSION_GREATER_EQUAL 22 AND DEFINED Protobuf_PROTOC_EXECUTABLE)
set(PROTOC_EXECUTABLE ${Protobuf_PROTOC_EXECUTABLE})
else()
set(PROTOC_EXECUTABLE protobuf::protoc)
endif()
else()
add_subdirectory(thirdparty/protobuf EXCLUDE_FROM_ALL)
endif()
Expand Down

0 comments on commit efa7e3b

Please sign in to comment.