summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/openembedded-layer/recipes-support/opencv/files/fix-build.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dynamic-layers/openembedded-layer/recipes-support/opencv/files/fix-build.patch')
-rw-r--r--dynamic-layers/openembedded-layer/recipes-support/opencv/files/fix-build.patch128
1 files changed, 128 insertions, 0 deletions
diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/fix-build.patch b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/fix-build.patch
new file mode 100644
index 00000000..07a29fe7
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/fix-build.patch
@@ -0,0 +1,128 @@
1Yocto specific tweaks to the build process:
2
3* Install python modules to site-packages.
4* Dont try to detect glibc version as that doesn't work when cross compiling.
5* Use shared protobuf and gflags libs.
6* Use system installed ocl headers.
7* We have va.h in recipe-sysroot and having a va.h here leads to failures.
8* Install sample binaries as well.
9
10Upstream-Status: Inappropriate
11Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
12
13diff --git a/cmake/developer_package/packaging/debian/debian.cmake b/cmake/developer_package/packaging/debian/debian.cmake
14index 735160b469..26f51229e2 100644
15--- a/cmake/developer_package/packaging/debian/debian.cmake
16+++ b/cmake/developer_package/packaging/debian/debian.cmake
17@@ -31,7 +31,11 @@ macro(ov_debian_cpack_set_dirs)
18 set(OV_CPACK_NGRAPH_CMAKEDIR ${OV_CPACK_RUNTIMEDIR}/cmake/ngraph${OpenVINO_VERSION})
19 set(OV_CPACK_OPENVINO_CMAKEDIR ${OV_CPACK_RUNTIMEDIR}/cmake/openvino${OpenVINO_VERSION})
20 set(OV_CPACK_DOCDIR ${CMAKE_INSTALL_DATADIR}/doc/openvino-${OpenVINO_VERSION})
21- set(OV_CPACK_PYTHONDIR lib/python3/dist-packages)
22+
23+ ov_get_pyversion(pyversion)
24+ if(pyversion)
25+ set(OV_CPACK_PYTHONDIR lib/${pyversion}/site-packages)
26+ endif()
27
28 # non-native stuff
29 set(OV_CPACK_SHAREDIR ${CMAKE_INSTALL_DATADIR}/openvino) # internal
30diff --git a/cmake/developer_package/target_flags.cmake b/cmake/developer_package/target_flags.cmake
31index 62831fffab..b123bbad75 100644
32--- a/cmake/developer_package/target_flags.cmake
33+++ b/cmake/developer_package/target_flags.cmake
34@@ -123,4 +123,4 @@ function(ov_glibc_version)
35 endif()
36 endfunction()
37
38-ov_glibc_version()
39+#ov_glibc_version()
40diff --git a/samples/c/common/opencv_c_wrapper/CMakeLists.txt b/samples/c/common/opencv_c_wrapper/CMakeLists.txt
41index f27e934793..da51c56cf3 100644
42--- a/samples/c/common/opencv_c_wrapper/CMakeLists.txt
43+++ b/samples/c/common/opencv_c_wrapper/CMakeLists.txt
44@@ -32,5 +32,4 @@ endif()
45 install(
46 TARGETS ${TARGET_NAME}
47 RUNTIME DESTINATION samples_bin/ COMPONENT samples_bin EXCLUDE_FROM_ALL
48- LIBRARY DESTINATION samples_bin/ COMPONENT samples_bin EXCLUDE_FROM_ALL
49-)
50+ LIBRARY DESTINATION ${IE_CPACK_LIBRARY_PATH} COMPONENT samples_bin)
51diff --git a/samples/cpp/CMakeLists.txt b/samples/cpp/CMakeLists.txt
52index 3a10819c47..d82262a714 100644
53--- a/samples/cpp/CMakeLists.txt
54+++ b/samples/cpp/CMakeLists.txt
55@@ -230,9 +230,8 @@ macro(ie_add_sample)
56 target_link_libraries(${IE_SAMPLE_NAME} PRIVATE ${ov_link_libraries} Threads::Threads ${IE_SAMPLE_DEPENDENCIES})
57
58 install(TARGETS ${IE_SAMPLE_NAME}
59- RUNTIME DESTINATION samples_bin/
60- COMPONENT samples_bin
61- EXCLUDE_FROM_ALL)
62+ DESTINATION ${CMAKE_INSTALL_BINDIR}
63+ COMPONENT samples_bin)
64
65 # create global target with all samples / demo apps
66 if(NOT TARGET ie_samples)
67diff --git a/samples/cpp/common/format_reader/CMakeLists.txt b/samples/cpp/common/format_reader/CMakeLists.txt
68index 44d94e8a27..208edd8e4e 100644
69--- a/samples/cpp/common/format_reader/CMakeLists.txt
70+++ b/samples/cpp/common/format_reader/CMakeLists.txt
71@@ -44,5 +44,5 @@ endif()
72 install(
73 TARGETS ${TARGET_NAME}
74 RUNTIME DESTINATION samples_bin/ COMPONENT samples_bin EXCLUDE_FROM_ALL
75- LIBRARY DESTINATION samples_bin/ COMPONENT samples_bin EXCLUDE_FROM_ALL
76+ LIBRARY DESTINATION ${IE_CPACK_LIBRARY_PATH} COMPONENT samples_bin
77 )
78diff --git a/src/plugins/intel_gpu/include/va/va.h b/src/plugins/intel_gpu/include/va/va.h
79deleted file mode 100644
80index 5c8a5c6f6e..0000000000
81--- a/src/plugins/intel_gpu/include/va/va.h
82+++ /dev/null
83@@ -1,6 +0,0 @@
84-// Copyright (C) 2018-2022 Intel Corporation
85-// SPDX-License-Identifier: Apache-2.0
86-//
87-
88-typedef cl_uint VASurfaceID;
89-typedef void* VADisplay;
90diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt
91index 98067991a7..bb19b592ee 100644
92--- a/thirdparty/CMakeLists.txt
93+++ b/thirdparty/CMakeLists.txt
94@@ -20,7 +20,7 @@ if(ENABLE_SAMPLES OR ENABLE_TESTS)
95 endif()
96
97 if(ENABLE_INTEL_GPU)
98- add_subdirectory(ocl)
99+ #add_subdirectory(ocl)
100 endif()
101
102 add_subdirectory(xbyak EXCLUDE_FROM_ALL)
103@@ -187,11 +187,11 @@ endif()
104
105 if(ENABLE_SAMPLES OR ENABLE_COMPILE_TOOL OR ENABLE_TESTS)
106 if(LINUX)
107- if(OV_OS_RHEL)
108- set(gflag_component nothreads_shared)
109- elseif(OV_OS_DEBIAN)
110- set(gflag_component nothreads_static)
111- endif()
112+ #if(OV_OS_RHEL)
113+ set(gflag_component nothreads_shared)
114+ #elseif(OV_OS_DEBIAN)
115+ #set(gflag_component nothreads_static)
116+ #endif()
117 find_package(gflags QUIET OPTIONAL_COMPONENTS ${gflag_component})
118 endif()
119
120@@ -248,7 +248,7 @@ endif()
121
122 if(ENABLE_OV_PADDLE_FRONTEND OR ENABLE_OV_ONNX_FRONTEND OR ENABLE_OV_TF_FRONTEND)
123 if(ENABLE_SYSTEM_PROTOBUF)
124- set(Protobuf_USE_STATIC_LIBS ON)
125+ #set(Protobuf_USE_STATIC_LIBS ON)
126 if(CMAKE_VERBOSE_MAKEFILE)
127 set(Protobuf_DEBUG ON)
128 endif()