summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/openembedded-layer/recipes-support/opencv/files/fix-build.patch
blob: 9e71e68970d824b4d445da3cd50b8cfb2c6063f6 (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
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
91
92
93
94
95
96
97
98
From 7deabff3d51df783c3e24bcc190c3ddebca7d9a8 Mon Sep 17 00:00:00 2001
From: Anuj Mittal <anuj.mittal@intel.com>
Date: Thu, 21 Sep 2023 14:07:28 +0800
Subject: [PATCH] cmake: yocto specific tweaks to the build process

* Dont try to detect glibc version as that doesn't work when cross compiling.
* Use shared gflags libs.
* Install sample binaries as well.
* Dont strip binaries.
* Dont try to write triggers for CPack. We package ourselves.

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/wheel/setup.py              |  1 -
 thirdparty/dependencies.cmake                   | 10 +++++-----
 5 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/cmake/developer_package/packaging/rpm/rpm.cmake b/cmake/developer_package/packaging/rpm/rpm.cmake
index 0609750054f..0f5c7765197 100644
--- a/cmake/developer_package/packaging/rpm/rpm.cmake
+++ b/cmake/developer_package/packaging/rpm/rpm.cmake
@@ -161,7 +161,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 8849aaf47d1..450b57c18d6 100644
--- a/samples/cpp/CMakeLists.txt
+++ b/samples/cpp/CMakeLists.txt
@@ -223,9 +223,9 @@ macro(ie_add_sample)
     target_link_libraries(${IE_SAMPLE_NAME} PRIVATE ${ov_link_libraries} Threads::Threads ${IE_SAMPLE_DEPENDENCIES})
 
     install(TARGETS ${IE_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 ie_samples)
diff --git a/src/bindings/python/wheel/setup.py b/src/bindings/python/wheel/setup.py
index 04323a8ba49..0498dcdc126 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", "Release",
-                                     "--strip",
                                      "--component", cpack_comp_name])
 
     def run(self):
diff --git a/thirdparty/dependencies.cmake b/thirdparty/dependencies.cmake
index 43e0ed671a9..b39479fdd6b 100644
--- a/thirdparty/dependencies.cmake
+++ b/thirdparty/dependencies.cmake
@@ -338,11 +338,11 @@ if(ENABLE_SAMPLES OR ENABLE_TESTS)
     elseif(APPLE OR WIN32)
         # on Windows and macOS we don't use gflags, because will be dynamically linked
     elseif(CMAKE_HOST_LINUX AND LINUX)
-        if(OV_OS_RHEL)
-            set(gflag_component nothreads_shared)
-        elseif(OV_OS_DEBIAN)
-            set(gflag_component nothreads_static)
-        endif()
+	#if(OV_OS_RHEL)
+        set(gflag_component nothreads_shared)
+	#elseif(OV_OS_DEBIAN)
+	#    set(gflag_component nothreads_static)
+	#endif()
         find_package(gflags QUIET OPTIONAL_COMPONENTS ${gflag_component})
     endif()
 
-- 
2.37.3