summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/openembedded-layer/recipes-support/opencv/files/fix-build.patch
blob: 4e3a4b027e8ba1f45a4b666a741c549c8bfba765 (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
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 0a37c910ae8..44444970ce1 100644
--- a/cmake/developer_package/target_flags.cmake
+++ b/cmake/developer_package/target_flags.cmake
@@ -136,4 +136,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 d2a65618071..80133c4aeb6 100644
--- a/samples/cpp/CMakeLists.txt
+++ b/samples/cpp/CMakeLists.txt
@@ -221,9 +221,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/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt
index edbcb824f4b..9d24dcec560 100644
--- a/thirdparty/CMakeLists.txt
+++ b/thirdparty/CMakeLists.txt
@@ -291,11 +291,11 @@ endif()
 if(ENABLE_SAMPLES OR ENABLE_COMPILE_TOOL OR ENABLE_TESTS)
     # on Windows and macOS we don't use gflags, because will be dynamically linked
     if(CMAKE_HOST_LINUX AND LINUX)
-        if(OV_OS_RHEL)
+	    #if(OV_OS_RHEL)
             set(gflag_component nothreads_shared)
-        elseif(OV_OS_DEBIAN)
-            set(gflag_component nothreads_static)
-        endif()
+	    #elseif(OV_OS_DEBIAN)
+	    #set(gflag_component nothreads_static)
+	    #endif()
         find_package(gflags QUIET OPTIONAL_COMPONENTS ${gflag_component})
     endif()
 
@@ -352,7 +352,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()