summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-Use-system-installed-dependencies.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-Use-system-installed-dependencies.patch')
-rw-r--r--dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-Use-system-installed-dependencies.patch196
1 files changed, 196 insertions, 0 deletions
diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-Use-system-installed-dependencies.patch b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-Use-system-installed-dependencies.patch
new file mode 100644
index 00000000..2dde9880
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-Use-system-installed-dependencies.patch
@@ -0,0 +1,196 @@
1From 86fc5a725883cf59086c319fca29ddb3e47fa7de Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Thu, 7 Apr 2022 21:39:26 +0800
4Subject: [PATCH 1/2] Use system installed dependencies
5
6Use the system versions of libva, ade and zlib.
7
8Upstream-Status: Inappropriate
9Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
10---
11 cmake/dependencies.cmake | 20 --------------------
12 cmake/extra_modules.cmake | 4 ++--
13 src/plugins/intel_gpu/include/va/va.h | 6 ------
14 tests/fuzz/src/CMakeLists.txt | 3 +--
15 thirdparty/CMakeLists.txt | 25 +++++++++++--------------
16 thirdparty/cnpy/CMakeLists.txt | 2 +-
17 6 files changed, 15 insertions(+), 45 deletions(-)
18 delete mode 100644 src/plugins/intel_gpu/include/va/va.h
19
20diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake
21index 8d66a012b8..75db89b915 100644
22--- a/cmake/dependencies.cmake
23+++ b/cmake/dependencies.cmake
24@@ -27,26 +27,6 @@ get_linux_name(LINUX_OS_NAME)
25
26 if(CMAKE_CROSSCOMPILING AND CMAKE_HOST_SYSTEM_NAME MATCHES Linux AND CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*")
27 set(protoc_version "3.18.2")
28-
29- RESOLVE_DEPENDENCY(SYSTEM_PROTOC_ROOT
30- ARCHIVE_LIN "protoc-${protoc_version}-linux-x86_64.tar.gz"
31- TARGET_PATH "${TEMP}/protoc-${protoc_version}-linux-x86_64"
32- SHA256 "42fde2b6044c1f74c7e86d4e03b43aac87128ddf57ac6ed8c4eab7a1e21bbf21"
33- )
34- debug_message(STATUS "host protoc-${protoc_version} root path = " ${SYSTEM_PROTOC_ROOT})
35-
36- reset_deps_cache(SYSTEM_PROTOC)
37-
38- find_host_program(
39- SYSTEM_PROTOC
40- NAMES protoc
41- PATHS "${SYSTEM_PROTOC_ROOT}/bin"
42- NO_DEFAULT_PATH)
43- if(NOT SYSTEM_PROTOC)
44- message(FATAL_ERROR "[ONNX IMPORTER] Missing host protoc binary")
45- endif()
46-
47- update_deps_cache(SYSTEM_PROTOC "${SYSTEM_PROTOC}" "Path to host protoc for ONNX Importer")
48 endif()
49
50 if(ENABLE_INTEL_MYRIAD)
51diff --git a/cmake/extra_modules.cmake b/cmake/extra_modules.cmake
52index 72eed6ad3a..39e9674a11 100644
53--- a/cmake/extra_modules.cmake
54+++ b/cmake/extra_modules.cmake
55@@ -22,7 +22,7 @@ function(ie_generate_dev_package_config)
56 configure_package_config_file("${OpenVINO_SOURCE_DIR}/cmake/templates/InferenceEngineDeveloperPackageConfig.cmake.in"
57 "${CMAKE_BINARY_DIR}/InferenceEngineDeveloperPackageConfig.cmake"
58 INSTALL_DESTINATION share # not used
59- PATH_VARS "OpenVINO_SOURCE_DIR;gflags_BINARY_DIR"
60+ PATH_VARS "OpenVINO_SOURCE_DIR"
61 NO_CHECK_REQUIRED_COMPONENTS_MACRO)
62
63 configure_file("${OpenVINO_SOURCE_DIR}/cmake/templates/InferenceEngineConfig-version.cmake.in"
64@@ -53,7 +53,7 @@ function(ov_generate_dev_package_config)
65 configure_package_config_file("${OpenVINO_SOURCE_DIR}/cmake/templates/OpenVINODeveloperPackageConfig.cmake.in"
66 "${CMAKE_BINARY_DIR}/OpenVINODeveloperPackageConfig.cmake"
67 INSTALL_DESTINATION share # not used
68- PATH_VARS "OpenVINO_SOURCE_DIR;gflags_BINARY_DIR"
69+ PATH_VARS "OpenVINO_SOURCE_DIR"
70 NO_CHECK_REQUIRED_COMPONENTS_MACRO)
71
72 configure_file("${OpenVINO_SOURCE_DIR}/cmake/templates/OpenVINOConfig-version.cmake.in"
73diff --git a/src/plugins/intel_gpu/include/va/va.h b/src/plugins/intel_gpu/include/va/va.h
74deleted file mode 100644
75index 5c8a5c6f6e..0000000000
76--- a/src/plugins/intel_gpu/include/va/va.h
77+++ /dev/null
78@@ -1,6 +0,0 @@
79-// Copyright (C) 2018-2022 Intel Corporation
80-// SPDX-License-Identifier: Apache-2.0
81-//
82-
83-typedef cl_uint VASurfaceID;
84-typedef void* VADisplay;
85diff --git a/tests/fuzz/src/CMakeLists.txt b/tests/fuzz/src/CMakeLists.txt
86index 5e6b7b168e..a81c51bb77 100644
87--- a/tests/fuzz/src/CMakeLists.txt
88+++ b/tests/fuzz/src/CMakeLists.txt
89@@ -10,14 +10,13 @@ add_custom_target(fuzz)
90 FILE(GLOB tests "*-fuzzer.cc")
91
92 add_subdirectory(../../../thirdparty/cnpy ${CMAKE_CURRENT_BINARY_DIR}/cnpy)
93-add_subdirectory(../../../thirdparty/zlib ${CMAKE_CURRENT_BINARY_DIR}/zlib)
94
95 foreach(test_source ${tests})
96 get_filename_component(test_name ${test_source} NAME_WE)
97 add_fuzzer(${test_name} ${test_source})
98
99 target_link_libraries(${test_name} PRIVATE
100- openvino::runtime cnpy zlib)
101+ openvino::runtime cnpy z)
102
103 add_dependencies(fuzz ${test_name})
104
105diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt
106index 38b0a5439d..4cba1588fe 100644
107--- a/thirdparty/CMakeLists.txt
108+++ b/thirdparty/CMakeLists.txt
109@@ -14,7 +14,7 @@ add_subdirectory(ittapi)
110 add_subdirectory(itt_collector EXCLUDE_FROM_ALL)
111 add_subdirectory(cnpy EXCLUDE_FROM_ALL)
112 if(ENABLE_INTEL_GPU)
113- add_subdirectory(ocl)
114+ #add_subdirectory(ocl)
115 endif()
116
117 add_subdirectory(xbyak EXCLUDE_FROM_ALL)
118@@ -72,12 +72,11 @@ endif()
119 add_library(ocv_hal INTERFACE)
120 target_include_directories(ocv_hal INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/ocv")
121
122-add_subdirectory(ade EXCLUDE_FROM_ALL)
123 add_subdirectory(fluid/modules/gapi EXCLUDE_FROM_ALL)
124-set_target_properties(ade fluid PROPERTIES FOLDER thirdparty)
125-openvino_developer_export_targets(COMPONENT openvino_common TARGETS ade fluid)
126+set_target_properties(fluid PROPERTIES FOLDER thirdparty)
127+openvino_developer_export_targets(COMPONENT openvino_common TARGETS fluid)
128+
129
130-ov_install_static_lib(ade openvino_common)
131 ov_install_static_lib(fluid openvino_common)
132
133 #
134@@ -93,8 +92,6 @@ if(gflags_FOUND)
135 set_target_properties(gflags PROPERTIES IMPORTED_GLOBAL ON)
136 message(STATUS "gflags (${gflags_VERSION}) is found at ${gflags_DIR}")
137 else()
138- add_subdirectory(gflags EXCLUDE_FROM_ALL)
139- openvino_developer_export_targets(COMPONENT openvino_common TARGETS gflags)
140 endif()
141
142 #
143@@ -119,13 +116,13 @@ if(ENABLE_OV_PADDLE_FRONTEND OR ENABLE_OV_ONNX_FRONTEND OR ENABLE_OV_TF_FRONTEND
144 set(Protobuf_DEBUG ON)
145 endif()
146 find_package(Protobuf 3.18.2 REQUIRED)
147- set(Protobuf_LITE_LIBRARIES protobuf::libprotobuf-lite)
148- set(Protobuf_LIBRARIES protobuf::libprotobuf)
149- set(SYSTEM_PROTOC protobuf::protoc)
150+ set(Protobuf_LITE_LIBRARIES protobuf::libprotobuf-lite)
151+ set(Protobuf_LIBRARIES protobuf::libprotobuf)
152+ #set(SYSTEM_PROTOC protobuf::protoc)
153 set(PROTOC_EXECUTABLE ${SYSTEM_PROTOC})
154
155 foreach(target ${SYSTEM_PROTOC} ${Protobuf_LIBRARIES} ${Protobuf_LITE_LIBRARIES})
156- set_property(TARGET ${target} PROPERTY IMPORTED_GLOBAL TRUE)
157+ #set_property(TARGET ${target} PROPERTY IMPORTED_GLOBAL TRUE)
158 endforeach()
159 else()
160 add_subdirectory(protobuf EXCLUDE_FROM_ALL)
161@@ -134,8 +131,8 @@ if(ENABLE_OV_PADDLE_FRONTEND OR ENABLE_OV_ONNX_FRONTEND OR ENABLE_OV_TF_FRONTEND
162 # forward variables used in the other places
163 set(SYSTEM_PROTOC ${SYSTEM_PROTOC} PARENT_SCOPE)
164 set(PROTOC_EXECUTABLE ${PROTOC_EXECUTABLE} PARENT_SCOPE)
165- set(Protobuf_LIBRARIES ${Protobuf_LIBRARIES} PARENT_SCOPE)
166- set(Protobuf_LITE_LIBRARIES ${Protobuf_LITE_LIBRARIES} PARENT_SCOPE)
167+ set(Protobuf_LIBRARIES ${Protobuf_LIBRARY} PARENT_SCOPE)
168+ set(Protobuf_LITE_LIBRARIES ${Protobuf_LITE_LIBRARY} PARENT_SCOPE)
169 set(Protobuf_INCLUDE_DIRS ${Protobuf_INCLUDE_DIRS} PARENT_SCOPE)
170 set(Protobuf_IN_FRONTEND ON PARENT_SCOPE)
171
172@@ -146,7 +143,7 @@ if(ENABLE_OV_PADDLE_FRONTEND OR ENABLE_OV_ONNX_FRONTEND OR ENABLE_OV_TF_FRONTEND
173 set(link_type INTERFACE)
174 endif()
175 if(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG)
176- target_compile_options(${target} ${link_type} -Wno-undef)
177+ #target_compile_options(${target} ${link_type} -Wno-undef)
178 endif()
179 endforeach()
180 endif()
181diff --git a/thirdparty/cnpy/CMakeLists.txt b/thirdparty/cnpy/CMakeLists.txt
182index 556adb03c4..793de9845c 100644
183--- a/thirdparty/cnpy/CMakeLists.txt
184+++ b/thirdparty/cnpy/CMakeLists.txt
185@@ -13,7 +13,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "^(Apple)?Clang$")
186 PRIVATE -Wno-all)
187 endif()
188
189-target_link_libraries(${TARGET_NAME} PUBLIC zlib::zlib)
190+target_link_libraries(${TARGET_NAME} PUBLIC z)
191 target_include_directories(${TARGET_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")
192
193 set_target_properties(${TARGET_NAME} PROPERTIES FOLDER thirdparty)
194--
1952.37.3
196