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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
From bfcf5ae581ca4e7266cf7dc65b1c71754cd78cc0 Mon Sep 17 00:00:00 2001
From: Anuj Mittal <anuj.mittal@intel.com>
Date: Wed, 29 Nov 2023 12:42:57 +0530
Subject: [PATCH 1/4] cmake: yocto specific tweaks to the build process
* Dont try to detect glibc version as that doesn't work when cross compiling.
* Install sample binaries as well.
* Dont strip binaries.
* Dont try to write triggers for CPack. We package ourselves.
* Fix the installation path for Python modules when baselib = lib64.
Upstream-Status: Inappropriate
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
cmake/developer_package/packaging/rpm/rpm.cmake | 2 +-
cmake/developer_package/target_flags.cmake | 2 +-
samples/cpp/CMakeLists.txt | 6 +++---
src/bindings/python/CMakeLists.txt | 2 +-
src/bindings/python/wheel/setup.py | 1 -
5 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/cmake/developer_package/packaging/rpm/rpm.cmake b/cmake/developer_package/packaging/rpm/rpm.cmake
index a7c0ec2cf61..40448e8a962 100644
--- a/cmake/developer_package/packaging/rpm/rpm.cmake
+++ b/cmake/developer_package/packaging/rpm/rpm.cmake
@@ -154,7 +154,7 @@ ov_rpm_specific_settings()
# needed to add triggers for packages with libraries
set(def_triggers "${OpenVINO_BINARY_DIR}/_CPack_Packages/triggers")
set(triggers_content "# /bin/sh -p\n/sbin/ldconfig\n")
-file(WRITE "${def_triggers}" "${triggers_content}")
+#file(WRITE "${def_triggers}" "${triggers_content}")
#
# Functions helpful for packaging your modules with RPM cpack
diff --git a/cmake/developer_package/target_flags.cmake b/cmake/developer_package/target_flags.cmake
index 29f23e713e1..942dd445b19 100644
--- a/cmake/developer_package/target_flags.cmake
+++ b/cmake/developer_package/target_flags.cmake
@@ -145,4 +145,4 @@ function(ov_glibc_version)
endif()
endfunction()
-ov_glibc_version()
+#ov_glibc_version()
diff --git a/samples/cpp/CMakeLists.txt b/samples/cpp/CMakeLists.txt
index c814cc37e2c..431e7bd2ed3 100644
--- a/samples/cpp/CMakeLists.txt
+++ b/samples/cpp/CMakeLists.txt
@@ -206,9 +206,9 @@ macro(ov_add_sample)
target_link_libraries(${SAMPLE_NAME} PRIVATE ${ov_link_libraries} Threads::Threads ${SAMPLE_DEPENDENCIES})
install(TARGETS ${SAMPLE_NAME}
- RUNTIME DESTINATION samples_bin/
- COMPONENT samples_bin
- EXCLUDE_FROM_ALL)
+ DESTINATION ${CMAKE_INSTALL_BINDIR}
+ COMPONENT samples_bin)
+
# create global target with all samples / demo apps
if(NOT TARGET ov_samples)
diff --git a/src/bindings/python/CMakeLists.txt b/src/bindings/python/CMakeLists.txt
index 58ff9b74302..4763994ba56 100644
--- a/src/bindings/python/CMakeLists.txt
+++ b/src/bindings/python/CMakeLists.txt
@@ -356,7 +356,7 @@ if(ENABLE_PYTHON_PACKAGING)
endif()
set(python_package_prefix "${CMAKE_CURRENT_BINARY_DIR}/install_${pyversion}")
- set(install_lib "${python_package_prefix}/lib/${python_versioned_folder}/${ov_site_packages}")
+ set(install_lib "${python_package_prefix}/${CMAKE_INSTALL_LIBDIR}/${python_versioned_folder}/${ov_site_packages}")
set(meta_info_subdir "openvino-${OpenVINO_VERSION}-py${python_xy}.egg-info")
set(meta_info_file "${install_lib}/${meta_info_subdir}/PKG-INFO")
diff --git a/src/bindings/python/wheel/setup.py b/src/bindings/python/wheel/setup.py
index 4b056912212..5f05d891310 100644
--- a/src/bindings/python/wheel/setup.py
+++ b/src/bindings/python/wheel/setup.py
@@ -270,7 +270,6 @@ class CustomBuild(build):
self.spawn(["cmake", "--install", binary_dir,
"--prefix", prefix,
"--config", CONFIG,
- "--strip",
"--component", cpack_comp_name])
def run(self):
--
2.34.1
|