summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/openembedded-layer/recipes-support/opencv/files
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2023-06-12 16:44:25 +0800
committerAnuj Mittal <anuj.mittal@intel.com>2023-06-14 09:10:58 +0800
commita4991839919b924b861aec02575b769c40336c4e (patch)
tree15fda9a8393158b69a912311c0f2755c1163f0a2 /dynamic-layers/openembedded-layer/recipes-support/opencv/files
parent3c367f25f6a0c043733b752e084a9c419416b5ad (diff)
downloadmeta-intel-a4991839919b924b861aec02575b769c40336c4e.tar.gz
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 <anuj.mittal@intel.com>
Diffstat (limited to 'dynamic-layers/openembedded-layer/recipes-support/opencv/files')
-rw-r--r--dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-protobuf-allow-target-protoc-to-be-built.patch45
1 files changed, 45 insertions, 0 deletions
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 @@
1From 450a1ba74eb5a6cf3946d8ae84b7de5bc97ccb35 Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Tue, 13 Jun 2023 12:34:08 +0800
4Subject: [PATCH] protobuf: allow target protoc to be built
5
6We can run target binaries using a qemu wrapper so allow these to be
7built and run.
8
9Upstream-Status: Inappropriate
10
11Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
12---
13 cmake/developer_package/frontends/frontends.cmake | 2 +-
14 thirdparty/protobuf/CMakeLists.txt | 2 +-
15 2 files changed, 2 insertions(+), 2 deletions(-)
16
17diff --git a/cmake/developer_package/frontends/frontends.cmake b/cmake/developer_package/frontends/frontends.cmake
18index 897e6f8e3a6..32b136fcea9 100644
19--- a/cmake/developer_package/frontends/frontends.cmake
20+++ b/cmake/developer_package/frontends/frontends.cmake
21@@ -146,7 +146,7 @@ macro(ov_add_frontend)
22 set(GENERATED_PROTO ${INFILE})
23 add_custom_command(
24 OUTPUT "${OUTPUT_PB_SRC}" "${OUTPUT_PB_HEADER}"
25- COMMAND ${PROTOC_EXECUTABLE} ARGS --cpp_out ${CMAKE_CURRENT_BINARY_DIR} -I ${FILE_DIR} ${FILE_WE}.proto
26+ COMMAND protoc ARGS --cpp_out ${CMAKE_CURRENT_BINARY_DIR} -I ${FILE_DIR} ${FILE_WE}.proto
27 DEPENDS ${PROTOC_DEPENDENCY} ${GENERATED_PROTO}
28 COMMENT "Running C++ protocol buffer compiler (${PROTOC_EXECUTABLE}) on ${GENERATED_PROTO}"
29 VERBATIM
30diff --git a/thirdparty/protobuf/CMakeLists.txt b/thirdparty/protobuf/CMakeLists.txt
31index 79e69a47b09..087f9e838c2 100644
32--- a/thirdparty/protobuf/CMakeLists.txt
33+++ b/thirdparty/protobuf/CMakeLists.txt
34@@ -27,7 +27,7 @@ set(protobuf_WITH_ZLIB OFF CACHE BOOL "Build with zlib support" FORCE)
35 if(CMAKE_CROSSCOMPILING OR
36 (APPLE AND (HOST_X86_64 AND AARCH64)) OR
37 (MSVC AND (HOST_X86_64 AND (AARCH64 OR ARM))))
38- set(protobuf_BUILD_PROTOC_BINARIES OFF CACHE BOOL "Build protoc binaries" FORCE)
39+ set(protobuf_BUILD_PROTOC_BINARIES ON CACHE BOOL "Build protoc binaries" FORCE)
40 else()
41 set(protobuf_BUILD_PROTOC_BINARIES ON CACHE BOOL "Build protoc binaries" FORCE)
42 endif()
43--
442.37.3
45