summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0004-protobuf-allow-target-protoc-to-be-built.patch
blob: 590951330b033c3891ca5fc19d1e06f3a6f140fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
From 3e288ed876c6bcb6aa3174e52446b479255ddf22 Mon Sep 17 00:00:00 2001
From: Anuj Mittal <anuj.mittal@intel.com>
Date: Wed, 29 Nov 2023 12:55:19 +0530
Subject: [PATCH 4/4] 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 <anuj.mittal@intel.com>
---
 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 49c5b881030..2a1ea8562bc 100644
--- a/cmake/developer_package/frontends/frontends.cmake
+++ b/cmake/developer_package/frontends/frontends.cmake
@@ -143,7 +143,7 @@ macro(ov_add_frontend)
         set(OUTPUT_PB_HEADER ${CMAKE_CURRENT_BINARY_DIR}/${relative_path}/${FILE_WE}.pb.h)
         add_custom_command(
                 OUTPUT "${OUTPUT_PB_SRC}" "${OUTPUT_PB_HEADER}"
-                COMMAND ${PROTOC_EXECUTABLE} ARGS --cpp_out ${CMAKE_CURRENT_BINARY_DIR} -I ${protofiles_root_dir} ${proto_file}
+                COMMAND protoc ARGS --cpp_out ${CMAKE_CURRENT_BINARY_DIR} -I ${protofiles_root_dir} ${proto_file}
                 DEPENDS ${PROTOC_DEPENDENCY} ${proto_file}
                 COMMENT "Running C++ protocol buffer compiler (${PROTOC_EXECUTABLE}) on ${proto_file_relative}"
                 VERBATIM
diff --git a/thirdparty/protobuf/CMakeLists.txt b/thirdparty/protobuf/CMakeLists.txt
index 4b6d6da87f3..409e492a5b3 100644
--- a/thirdparty/protobuf/CMakeLists.txt
+++ b/thirdparty/protobuf/CMakeLists.txt
@@ -28,7 +28,7 @@ set(ABSL_PROPAGATE_CXX_STD ON CACHE BOOL "Abseil protogate CXX standard to depen
 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.34.1