summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/openembedded-layer/recipes-support/opencv/files/fix-build.patch
blob: 86ed2a9619aba2c3f35f8c01fa0beb6e8249acf6 (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
Yocto specific tweaks to the build process:
  
* Dont try to detect glibc version as that doesn't work when cross compiling.
* Use shared protobuf and gflags libs.
* Install sample binaries as well.

Upstream-Status: Inappropriate
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>

diff --git a/cmake/developer_package/target_flags.cmake b/cmake/developer_package/target_flags.cmake
index e6c72540288..fec9996db14 100644
--- a/cmake/developer_package/target_flags.cmake
+++ b/cmake/developer_package/target_flags.cmake
@@ -123,4 +123,4 @@ function(ov_glibc_version)
     endif()
 endfunction()
 
-ov_glibc_version()
+#ov_glibc_version()
diff --git a/samples/c/common/opencv_c_wrapper/CMakeLists.txt b/samples/c/common/opencv_c_wrapper/CMakeLists.txt
index 40c29d3c297..f6800592de9 100644
--- a/samples/c/common/opencv_c_wrapper/CMakeLists.txt
+++ b/samples/c/common/opencv_c_wrapper/CMakeLists.txt
@@ -32,5 +32,4 @@ endif()
 install(
     TARGETS ${TARGET_NAME}
     RUNTIME DESTINATION samples_bin/ COMPONENT samples_bin EXCLUDE_FROM_ALL
-    LIBRARY DESTINATION samples_bin/ COMPONENT samples_bin EXCLUDE_FROM_ALL
-)
+    LIBRARY DESTINATION ${IE_CPACK_LIBRARY_PATH} COMPONENT samples_bin)
diff --git a/samples/cpp/CMakeLists.txt b/samples/cpp/CMakeLists.txt
index 1fe54c602e8..01c86d418d9 100644
--- a/samples/cpp/CMakeLists.txt
+++ b/samples/cpp/CMakeLists.txt
@@ -230,9 +230,8 @@ 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/samples/cpp/common/format_reader/CMakeLists.txt b/samples/cpp/common/format_reader/CMakeLists.txt
index 7c07bf07dbb..4cd566749e5 100644
--- a/samples/cpp/common/format_reader/CMakeLists.txt
+++ b/samples/cpp/common/format_reader/CMakeLists.txt
@@ -44,5 +44,5 @@ endif()
 install(
     TARGETS ${TARGET_NAME}
     RUNTIME DESTINATION samples_bin/ COMPONENT samples_bin EXCLUDE_FROM_ALL
-    LIBRARY DESTINATION samples_bin/ COMPONENT samples_bin EXCLUDE_FROM_ALL
+    LIBRARY DESTINATION ${IE_CPACK_LIBRARY_PATH} COMPONENT samples_bin
 )
diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt
index cf2863438c7..3ec5c5ed86b 100644
--- a/thirdparty/CMakeLists.txt
+++ b/thirdparty/CMakeLists.txt
@@ -268,11 +268,11 @@ endif()
 
 if(ENABLE_SAMPLES OR ENABLE_COMPILE_TOOL OR ENABLE_TESTS)
     if(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()
 
@@ -329,7 +329,7 @@ endif()
 
 if(ENABLE_OV_PADDLE_FRONTEND OR ENABLE_OV_ONNX_FRONTEND OR ENABLE_OV_TF_FRONTEND)
     if(ENABLE_SYSTEM_PROTOBUF)
-        set(Protobuf_USE_STATIC_LIBS ON)
+	    #set(Protobuf_USE_STATIC_LIBS ON)
         if(CMAKE_VERBOSE_MAKEFILE)
             set(Protobuf_DEBUG ON)
         endif()