diff options
Diffstat (limited to 'dynamic-layers/openembedded-layer/recipes-support/opencv/files')
3 files changed, 164 insertions, 0 deletions
diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-cmake-yocto-specific-tweaks-to-the-build-process.patch b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-cmake-yocto-specific-tweaks-to-the-build-process.patch new file mode 100644 index 00000000..7f5b46c6 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-cmake-yocto-specific-tweaks-to-the-build-process.patch | |||
@@ -0,0 +1,86 @@ | |||
1 | From e4edbdae9a2dbfec6fd0706bdfff8abdfe3363fc Mon Sep 17 00:00:00 2001 | ||
2 | From: Anuj Mittal <anuj.mittal@intel.com> | ||
3 | Date: Wed, 29 Nov 2023 12:42:57 +0530 | ||
4 | Subject: [PATCH] cmake: yocto specific tweaks to the build process | ||
5 | |||
6 | * Dont try to detect glibc version as that doesn't work when cross compiling. | ||
7 | * Dont try to detect CXX11_ABI | ||
8 | * Install sample binaries as well. | ||
9 | * Dont try to write triggers for CPack. We package ourselves. | ||
10 | * Fix the installation path for Python modules when baselib = lib64. | ||
11 | |||
12 | Upstream-Status: Inappropriate | ||
13 | |||
14 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
15 | --- | ||
16 | cmake/developer_package/packaging/rpm/rpm.cmake | 2 +- | ||
17 | cmake/developer_package/target_flags.cmake | 4 ++-- | ||
18 | samples/cpp/CMakeLists.txt | 6 +++--- | ||
19 | src/bindings/python/CMakeLists.txt | 2 +- | ||
20 | 4 files changed, 7 insertions(+), 7 deletions(-) | ||
21 | |||
22 | diff --git a/cmake/developer_package/packaging/rpm/rpm.cmake b/cmake/developer_package/packaging/rpm/rpm.cmake | ||
23 | index 99f11730983..1a1f61fcd3d 100644 | ||
24 | --- a/cmake/developer_package/packaging/rpm/rpm.cmake | ||
25 | +++ b/cmake/developer_package/packaging/rpm/rpm.cmake | ||
26 | @@ -156,7 +156,7 @@ ov_rpm_specific_settings() | ||
27 | # needed to add triggers for packages with libraries | ||
28 | set(def_triggers "${OpenVINO_BINARY_DIR}/_CPack_Packages/triggers") | ||
29 | set(triggers_content "# /bin/sh -p\n/sbin/ldconfig\n") | ||
30 | -file(WRITE "${def_triggers}" "${triggers_content}") | ||
31 | +#file(WRITE "${def_triggers}" "${triggers_content}") | ||
32 | |||
33 | # | ||
34 | # Functions helpful for packaging your modules with RPM cpack | ||
35 | diff --git a/cmake/developer_package/target_flags.cmake b/cmake/developer_package/target_flags.cmake | ||
36 | index d047a1aebd9..4e8ca68c60f 100644 | ||
37 | --- a/cmake/developer_package/target_flags.cmake | ||
38 | +++ b/cmake/developer_package/target_flags.cmake | ||
39 | @@ -149,7 +149,7 @@ function(ov_glibc_version) | ||
40 | endif() | ||
41 | endfunction() | ||
42 | |||
43 | -ov_glibc_version() | ||
44 | +#ov_glibc_version() | ||
45 | |||
46 | # | ||
47 | # Detects default value for _GLIBCXX_USE_CXX11_ABI for current compiler | ||
48 | @@ -160,4 +160,4 @@ macro(ov_get_glibcxx_use_cxx11_abi) | ||
49 | endif() | ||
50 | endmacro() | ||
51 | |||
52 | -ov_get_glibcxx_use_cxx11_abi() | ||
53 | +#ov_get_glibcxx_use_cxx11_abi() | ||
54 | diff --git a/samples/cpp/CMakeLists.txt b/samples/cpp/CMakeLists.txt | ||
55 | index 4d33bff944e..3e7f1458578 100644 | ||
56 | --- a/samples/cpp/CMakeLists.txt | ||
57 | +++ b/samples/cpp/CMakeLists.txt | ||
58 | @@ -206,9 +206,9 @@ macro(ov_add_sample) | ||
59 | target_link_libraries(${SAMPLE_NAME} PRIVATE ${ov_link_libraries} Threads::Threads ${SAMPLE_DEPENDENCIES}) | ||
60 | |||
61 | install(TARGETS ${SAMPLE_NAME} | ||
62 | - RUNTIME DESTINATION samples_bin/ | ||
63 | - COMPONENT samples_bin | ||
64 | - EXCLUDE_FROM_ALL) | ||
65 | + DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
66 | + COMPONENT samples_bin) | ||
67 | + | ||
68 | |||
69 | # create global target with all samples / demo apps | ||
70 | if(NOT TARGET ov_samples) | ||
71 | diff --git a/src/bindings/python/CMakeLists.txt b/src/bindings/python/CMakeLists.txt | ||
72 | index 6cf43ec3fed..d539b9d003f 100644 | ||
73 | --- a/src/bindings/python/CMakeLists.txt | ||
74 | +++ b/src/bindings/python/CMakeLists.txt | ||
75 | @@ -320,7 +320,7 @@ if(ENABLE_PYTHON_PACKAGING) | ||
76 | # install OpenVINO Python API | ||
77 | |||
78 | set(python_package_prefix "${CMAKE_CURRENT_BINARY_DIR}/install_${pyversion}") | ||
79 | - set(install_lib "${python_package_prefix}/lib/${python_versioned_folder}/${ov_site_packages}") | ||
80 | + set(install_lib "${python_package_prefix}/${CMAKE_INSTALL_LIBDIR}/${python_versioned_folder}/${ov_site_packages}") | ||
81 | set(openvino_meta_info_subdir "openvino-${OpenVINO_VERSION}-py${python_xy}.egg-info") | ||
82 | set(openvino_meta_info_file "${install_lib}/${openvino_meta_info_subdir}/PKG-INFO") | ||
83 | |||
84 | -- | ||
85 | 2.34.1 | ||
86 | |||
diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0002-cmake-Fix-overloaded-virtual-error.patch b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0002-cmake-Fix-overloaded-virtual-error.patch new file mode 100644 index 00000000..8a1464d5 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0002-cmake-Fix-overloaded-virtual-error.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 4a909a03b6dd336e7ea76e3f44d7cfb5d7e44798 Mon Sep 17 00:00:00 2001 | ||
2 | From: Anuj Mittal <anuj.mittal@intel.com> | ||
3 | Date: Wed, 29 Nov 2023 12:49:35 +0530 | ||
4 | Subject: [PATCH 2/3] cmake: Fix overloaded-virtual error | ||
5 | |||
6 | * Remove -Werror for: | ||
7 | |git/src/plugins/intel_gpu/src/kernel_selector/jitter.h:129:28: error: 'virtual kernel_selector::JitDefinitions kernel_selector::JitConstant::GetDefinitions() const' was hidden [-Werror=overloaded-virtual=] | ||
8 | | 129 | virtual JitDefinitions GetDefinitions() const = 0; | ||
9 | | | | ||
10 | |||
11 | Upstream-Status: Pending | ||
12 | |||
13 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
14 | --- | ||
15 | src/plugins/intel_gpu/CMakeLists.txt | 2 +- | ||
16 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/src/plugins/intel_gpu/CMakeLists.txt b/src/plugins/intel_gpu/CMakeLists.txt | ||
19 | index 2f3d9127dde..2fd4f5c1b3c 100644 | ||
20 | --- a/src/plugins/intel_gpu/CMakeLists.txt | ||
21 | +++ b/src/plugins/intel_gpu/CMakeLists.txt | ||
22 | @@ -47,7 +47,7 @@ add_subdirectory(thirdparty) | ||
23 | include(thirdparty/cmake/rapidjson.cmake) | ||
24 | |||
25 | if(CMAKE_COMPILER_IS_GNUCXX) | ||
26 | - ov_add_compiler_flags(-Werror) | ||
27 | + #ov_add_compiler_flags(-Werror) | ||
28 | endif() | ||
29 | |||
30 | add_subdirectory(src/runtime) | ||
31 | -- | ||
32 | 2.34.1 | ||
33 | |||
diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0003-protobuf-allow-target-protoc-to-be-built.patch b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0003-protobuf-allow-target-protoc-to-be-built.patch new file mode 100644 index 00000000..bbdeaa2a --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0003-protobuf-allow-target-protoc-to-be-built.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | From 450d94b475460d1af32b207d0ced495794863f0d Mon Sep 17 00:00:00 2001 | ||
2 | From: Anuj Mittal <anuj.mittal@intel.com> | ||
3 | Date: Wed, 29 Nov 2023 12:55:19 +0530 | ||
4 | Subject: [PATCH 3/3] protobuf: allow target protoc to be built | ||
5 | |||
6 | We can run target binaries using a qemu wrapper so allow these to be | ||
7 | built and run. | ||
8 | |||
9 | Upstream-Status: Inappropriate | ||
10 | |||
11 | Signed-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 | |||
17 | diff --git a/cmake/developer_package/frontends/frontends.cmake b/cmake/developer_package/frontends/frontends.cmake | ||
18 | index f3b5520d6d2..7579f638c5a 100644 | ||
19 | --- a/cmake/developer_package/frontends/frontends.cmake | ||
20 | +++ b/cmake/developer_package/frontends/frontends.cmake | ||
21 | @@ -163,7 +163,7 @@ macro(ov_add_frontend) | ||
22 | set(OUTPUT_PB_HEADER ${CMAKE_CURRENT_BINARY_DIR}/${relative_path}/${FILE_WE}.pb.h) | ||
23 | add_custom_command( | ||
24 | OUTPUT "${OUTPUT_PB_SRC}" "${OUTPUT_PB_HEADER}" | ||
25 | - COMMAND ${PROTOC_EXECUTABLE} ARGS --cpp_out ${CMAKE_CURRENT_BINARY_DIR} -I ${protofiles_root_dir} ${proto_file} | ||
26 | + COMMAND protoc ARGS --cpp_out ${CMAKE_CURRENT_BINARY_DIR} -I ${protofiles_root_dir} ${proto_file} | ||
27 | DEPENDS ${PROTOC_DEPENDENCY} ${proto_file} | ||
28 | COMMENT "Running C++ protocol buffer compiler (${PROTOC_EXECUTABLE}) on ${proto_file_relative}" | ||
29 | VERBATIM | ||
30 | diff --git a/thirdparty/protobuf/CMakeLists.txt b/thirdparty/protobuf/CMakeLists.txt | ||
31 | index 15f32601f23..36853caf7dc 100644 | ||
32 | --- a/thirdparty/protobuf/CMakeLists.txt | ||
33 | +++ b/thirdparty/protobuf/CMakeLists.txt | ||
34 | @@ -31,7 +31,7 @@ unset(HAVE_ZLIB CACHE) | ||
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 | -- | ||
44 | 2.34.1 | ||
45 | |||