From a4991839919b924b861aec02575b769c40336c4e Mon Sep 17 00:00:00 2001 From: Anuj Mittal Date: Mon, 12 Jun 2023 16:44:25 +0800 Subject: openvino-inference-engine: use protobuf as a submodule Use the version of protobuf fetched by OpenVINO instead of the system version to avoid problems because of differences in what was tested. The build invokes protoc at build time so provide a qemu wrapper that will allow that to be run on build machine. Signed-off-by: Anuj Mittal --- ...-protobuf-allow-target-protoc-to-be-built.patch | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-protobuf-allow-target-protoc-to-be-built.patch (limited to 'dynamic-layers/openembedded-layer/recipes-support/opencv/files') diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-protobuf-allow-target-protoc-to-be-built.patch b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-protobuf-allow-target-protoc-to-be-built.patch new file mode 100644 index 00000000..6bc54335 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-protobuf-allow-target-protoc-to-be-built.patch @@ -0,0 +1,45 @@ +From 450a1ba74eb5a6cf3946d8ae84b7de5bc97ccb35 Mon Sep 17 00:00:00 2001 +From: Anuj Mittal +Date: Tue, 13 Jun 2023 12:34:08 +0800 +Subject: [PATCH] protobuf: allow target protoc to be built + +We can run target binaries using a qemu wrapper so allow these to be +built and run. + +Upstream-Status: Inappropriate + +Signed-off-by: Anuj Mittal +--- + cmake/developer_package/frontends/frontends.cmake | 2 +- + thirdparty/protobuf/CMakeLists.txt | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/cmake/developer_package/frontends/frontends.cmake b/cmake/developer_package/frontends/frontends.cmake +index 897e6f8e3a6..32b136fcea9 100644 +--- a/cmake/developer_package/frontends/frontends.cmake ++++ b/cmake/developer_package/frontends/frontends.cmake +@@ -146,7 +146,7 @@ macro(ov_add_frontend) + set(GENERATED_PROTO ${INFILE}) + add_custom_command( + OUTPUT "${OUTPUT_PB_SRC}" "${OUTPUT_PB_HEADER}" +- COMMAND ${PROTOC_EXECUTABLE} ARGS --cpp_out ${CMAKE_CURRENT_BINARY_DIR} -I ${FILE_DIR} ${FILE_WE}.proto ++ COMMAND protoc ARGS --cpp_out ${CMAKE_CURRENT_BINARY_DIR} -I ${FILE_DIR} ${FILE_WE}.proto + DEPENDS ${PROTOC_DEPENDENCY} ${GENERATED_PROTO} + COMMENT "Running C++ protocol buffer compiler (${PROTOC_EXECUTABLE}) on ${GENERATED_PROTO}" + VERBATIM +diff --git a/thirdparty/protobuf/CMakeLists.txt b/thirdparty/protobuf/CMakeLists.txt +index 79e69a47b09..087f9e838c2 100644 +--- a/thirdparty/protobuf/CMakeLists.txt ++++ b/thirdparty/protobuf/CMakeLists.txt +@@ -27,7 +27,7 @@ set(protobuf_WITH_ZLIB OFF CACHE BOOL "Build with zlib support" FORCE) + if(CMAKE_CROSSCOMPILING OR + (APPLE AND (HOST_X86_64 AND AARCH64)) OR + (MSVC AND (HOST_X86_64 AND (AARCH64 OR ARM)))) +- set(protobuf_BUILD_PROTOC_BINARIES OFF CACHE BOOL "Build protoc binaries" FORCE) ++ set(protobuf_BUILD_PROTOC_BINARIES ON CACHE BOOL "Build protoc binaries" FORCE) + else() + set(protobuf_BUILD_PROTOC_BINARIES ON CACHE BOOL "Build protoc binaries" FORCE) + endif() +-- +2.37.3 + -- cgit v1.2.3-54-g00ecf