summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0002-Fix-installation-of-binaries-and-libraries.patch
blob: 12c8054e5d4570d0121437ea72aeda1a8d601b43 (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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
From 3d55027cd86db299faeed0a4a97ddcec1baedd61 Mon Sep 17 00:00:00 2001
From: Anuj Mittal <anuj.mittal@intel.com>
Date: Mon, 11 Apr 2022 11:11:23 +0800
Subject: [PATCH 2/2] Fix installation of binaries and libraries

Make sure binaries are installed correctly.

Upstream-Status: Inappropriate

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
 CMakeLists.txt                                       |  2 +-
 cmake/developer_package/frontends/frontends.cmake    |  2 +-
 cmake/developer_package/packaging.cmake              |  4 ++--
 cmake/developer_package/plugins/plugins.cmake        |  2 +-
 docs/CMakeLists.txt                                  |  3 ++-
 samples/CMakeLists.txt                               |  2 +-
 samples/c/common/opencv_c_wrapper/CMakeLists.txt     |  2 ++
 samples/cpp/CMakeLists.txt                           |  2 ++
 scripts/CMakeLists.txt                               | 10 +++++-----
 src/bindings/c/src/CMakeLists.txt                    |  4 ++--
 src/cmake/openvino.cmake                             | 12 ++++++------
 src/common/preprocessing/CMakeLists.txt              |  2 +-
 src/core/CMakeLists.txt                              |  4 ++--
 src/inference/CMakeLists.txt                         |  2 +-
 .../intel_gpu/src/kernel_selector/CMakeLists.txt     |  2 +-
 src/plugins/intel_myriad/myriad_dependencies.cmake   |  2 +-
 .../intel_myriad/myriad_plugin/CMakeLists.txt        |  2 +-
 tools/CMakeLists.txt                                 |  2 +-
 tools/compile_tool/CMakeLists.txt                    |  8 ++++----
 19 files changed, 37 insertions(+), 32 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f570d4246c..d20ac60749 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -111,7 +111,7 @@ include(cmake/extra_modules.cmake)
 add_subdirectory(docs)
 add_subdirectory(tools)
 add_subdirectory(scripts)
-add_subdirectory(licensing)
+#add_subdirectory(licensing)
 
 #
 # CPack
diff --git a/cmake/developer_package/frontends/frontends.cmake b/cmake/developer_package/frontends/frontends.cmake
index 0779ed286d..f80cb9bb79 100644
--- a/cmake/developer_package/frontends/frontends.cmake
+++ b/cmake/developer_package/frontends/frontends.cmake
@@ -2,7 +2,7 @@
 # SPDX-License-Identifier: Apache-2.0
 #
 
-set(FRONTEND_INSTALL_INCLUDE "runtime/include/")
+set(FRONTEND_INSTALL_INCLUDE "include/")
 set(FRONTEND_NAME_PREFIX "openvino_")
 set(FRONTEND_NAME_SUFFIX "_frontend")
 
diff --git a/cmake/developer_package/packaging.cmake b/cmake/developer_package/packaging.cmake
index 458ddade93..626eb6548a 100644
--- a/cmake/developer_package/packaging.cmake
+++ b/cmake/developer_package/packaging.cmake
@@ -20,8 +20,8 @@ function(ie_cpack_set_library_dir)
         set(IE_CPACK_RUNTIME_PATH runtime/lib/${ARCH_FOLDER}/$<CONFIG> PARENT_SCOPE)
         set(IE_CPACK_ARCHIVE_PATH runtime/lib/${ARCH_FOLDER}/$<CONFIG> PARENT_SCOPE)
     else()
-        set(IE_CPACK_LIBRARY_PATH runtime/lib/${ARCH_FOLDER} PARENT_SCOPE)
-        set(IE_CPACK_RUNTIME_PATH runtime/lib/${ARCH_FOLDER} PARENT_SCOPE)
+        set(IE_CPACK_LIBRARY_PATH ${CMAKE_INSTALL_LIBDIR} PARENT_SCOPE)
+        set(IE_CPACK_RUNTIME_PATH ${CMAKE_INSTALL_BINDIR} PARENT_SCOPE)
         set(IE_CPACK_ARCHIVE_PATH runtime/lib/${ARCH_FOLDER} PARENT_SCOPE)
     endif()
 endfunction()
diff --git a/cmake/developer_package/plugins/plugins.cmake b/cmake/developer_package/plugins/plugins.cmake
index b748ebddef..fe670e88bc 100644
--- a/cmake/developer_package/plugins/plugins.cmake
+++ b/cmake/developer_package/plugins/plugins.cmake
@@ -139,7 +139,7 @@ function(ie_add_plugin)
 
             if(BUILD_SHARED_LIBS)
                 install(TARGETS ${IE_PLUGIN_NAME}
-                        LIBRARY DESTINATION ${IE_CPACK_RUNTIME_PATH}
+                        LIBRARY DESTINATION ${IE_CPACK_LIBRARY_PATH}
                         COMPONENT ${install_component})
             else()
                 ov_install_static_lib(${IE_PLUGIN_NAME} ${install_component})
diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
index 86b0e8652b..4f31d3cc4b 100644
--- a/docs/CMakeLists.txt
+++ b/docs/CMakeLists.txt
@@ -36,9 +36,10 @@ if(NOT ENABLE_DOCKER)
     foreach(target openvino_template_plugin template_extension openvino_template_extension)
         if(TARGET ${target})
             install(TARGETS ${target}
-                    LIBRARY DESTINATION ${IE_CPACK_RUNTIME_PATH}
+		    LIBRARY DESTINATION ${IE_CPACK_RUNTIME_PATH}
                     COMPONENT tests
                     EXCLUDE_FROM_ALL)
+            install(TARGETS ${target} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
         endif()
     endforeach()
 endif()
diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt
index 8101b5e328..6abe8c20ce 100644
--- a/samples/CMakeLists.txt
+++ b/samples/CMakeLists.txt
@@ -9,7 +9,7 @@ add_subdirectory(c)
 if(TARGET format_reader)
     install(TARGETS format_reader
             RUNTIME DESTINATION ${IE_CPACK_RUNTIME_PATH} COMPONENT tests EXCLUDE_FROM_ALL
-            LIBRARY DESTINATION ${IE_CPACK_LIBRARY_PATH} COMPONENT tests EXCLUDE_FROM_ALL)
+            LIBRARY DESTINATION ${IE_CPACK_LIBRARY_PATH} COMPONENT tests)
 endif()
 
 openvino_developer_export_targets(COMPONENT openvino_common TARGETS format_reader ie_samples_utils)
diff --git a/samples/c/common/opencv_c_wrapper/CMakeLists.txt b/samples/c/common/opencv_c_wrapper/CMakeLists.txt
index 2755579a0f..4a5f5b424f 100644
--- a/samples/c/common/opencv_c_wrapper/CMakeLists.txt
+++ b/samples/c/common/opencv_c_wrapper/CMakeLists.txt
@@ -34,3 +34,5 @@ install(
     RUNTIME DESTINATION samples_bin/ COMPONENT samples_bin EXCLUDE_FROM_ALL
     LIBRARY DESTINATION samples_bin/ COMPONENT samples_bin EXCLUDE_FROM_ALL
 )
+
+install(TARGETS ${TARGET_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
diff --git a/samples/cpp/CMakeLists.txt b/samples/cpp/CMakeLists.txt
index 3628c8283a..186540940f 100644
--- a/samples/cpp/CMakeLists.txt
+++ b/samples/cpp/CMakeLists.txt
@@ -258,6 +258,8 @@ macro(ie_add_sample)
             COMPONENT samples_bin
             EXCLUDE_FROM_ALL)
 
+    install(TARGETS ${IE_SAMPLE_NAME} DESTINATION bin)
+
     # create global target with all samples / demo apps
     if(NOT TARGET ie_samples)
         add_custom_target(ie_samples ALL)
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
index 4e9f76638f..6d8df5f0a1 100644
--- a/scripts/CMakeLists.txt
+++ b/scripts/CMakeLists.txt
@@ -37,7 +37,7 @@ ie_shellcheck_process(DIRECTORY "${OpenVINO_SOURCE_DIR}"
 
 # install setupvars
 
-ie_cpack_add_component(setupvars REQUIRED)
+#ie_cpack_add_component(setupvars REQUIRED)
 
 if(UNIX)
     set(_setupvars_file setupvars/setupvars.sh)
@@ -54,13 +54,13 @@ elseif(WIN32)
         file(WRITE "${_setupvars_file}" "${_setupvars_content}")
     endif()
 endif()
-install(PROGRAMS "${_setupvars_file}"
-        DESTINATION .
-        COMPONENT setupvars)
+#install(PROGRAMS "${_setupvars_file}"
+#        DESTINATION .
+#        COMPONENT setupvars)
 
 # install install_dependencies
 
-if(LINUX)
+if (FALSE)
     ie_cpack_add_component(install_dependencies REQUIRED)
     install(DIRECTORY install_dependencies/
             DESTINATION install_dependencies
diff --git a/src/bindings/c/src/CMakeLists.txt b/src/bindings/c/src/CMakeLists.txt
index 9200d0bda1..b3636e0716 100644
--- a/src/bindings/c/src/CMakeLists.txt
+++ b/src/bindings/c/src/CMakeLists.txt
@@ -43,8 +43,8 @@ install(TARGETS ${TARGET_NAME} EXPORT OpenVINOTargets
         RUNTIME DESTINATION ${IE_CPACK_RUNTIME_PATH} COMPONENT core_c
         ARCHIVE DESTINATION ${IE_CPACK_ARCHIVE_PATH} COMPONENT core_c
         LIBRARY DESTINATION ${IE_CPACK_LIBRARY_PATH} COMPONENT core_c
-        INCLUDES DESTINATION runtime/include/ie)
+        INCLUDES DESTINATION include/ie)
 
 install(DIRECTORY ${InferenceEngine_C_API_SOURCE_DIR}/include/
-        DESTINATION runtime/include/ie
+        DESTINATION include/ie
         COMPONENT core_c_dev)
diff --git a/src/cmake/openvino.cmake b/src/cmake/openvino.cmake
index 340896e3a8..9bda84fe51 100644
--- a/src/cmake/openvino.cmake
+++ b/src/cmake/openvino.cmake
@@ -62,8 +62,8 @@ install(TARGETS ${TARGET_NAME} EXPORT OpenVINOTargets
         RUNTIME DESTINATION ${IE_CPACK_RUNTIME_PATH} COMPONENT core
         ARCHIVE DESTINATION ${IE_CPACK_ARCHIVE_PATH} COMPONENT core
         LIBRARY DESTINATION ${IE_CPACK_LIBRARY_PATH} COMPONENT core
-        INCLUDES DESTINATION runtime/include
-                             runtime/include/ie)
+        INCLUDES DESTINATION include
+                             include/ie)
 
 #
 # Add openvin::dev target
@@ -107,7 +107,7 @@ ie_cpack_add_component(core_dev REQUIRED DEPENDS core ${core_dev_components})
 
 if(BUILD_SHARED_LIBS)
     install(FILES $<TARGET_FILE_DIR:${TARGET_NAME}>/plugins.xml
-            DESTINATION ${IE_CPACK_RUNTIME_PATH}
+            DESTINATION ${IE_CPACK_LIBRARY_PATH}
             COMPONENT core)
 
     # for InferenceEngineUnitTest
@@ -126,7 +126,7 @@ endif()
 install(EXPORT OpenVINOTargets
         FILE OpenVINOTargets.cmake
         NAMESPACE openvino::
-        DESTINATION runtime/cmake
+	DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/OpenVINO
         COMPONENT core_dev)
 
 set(PUBLIC_HEADERS_DIR "${OpenVINO_SOURCE_DIR}/src/inference/include")
@@ -167,10 +167,10 @@ configure_file("${OpenVINO_SOURCE_DIR}/cmake/templates/OpenVINOConfig-version.cm
 
 install(FILES "${CMAKE_BINARY_DIR}/share/InferenceEngineConfig.cmake"
               "${CMAKE_BINARY_DIR}/InferenceEngineConfig-version.cmake"
-        DESTINATION runtime/cmake
+	DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/InferenceEngine
         COMPONENT core_dev)
 
 install(FILES "${CMAKE_BINARY_DIR}/share/OpenVINOConfig.cmake"
               "${CMAKE_BINARY_DIR}/OpenVINOConfig-version.cmake"
-        DESTINATION runtime/cmake
+	DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/OpenVINO
         COMPONENT core_dev)
diff --git a/src/common/preprocessing/CMakeLists.txt b/src/common/preprocessing/CMakeLists.txt
index e41e286c95..11aaffca6a 100644
--- a/src/common/preprocessing/CMakeLists.txt
+++ b/src/common/preprocessing/CMakeLists.txt
@@ -202,7 +202,7 @@ openvino_developer_export_targets(COMPONENT core TARGETS ${TARGET_NAME})
 
 if(BUILD_SHARED_LIBS)
     install(TARGETS ${TARGET_NAME}
-            LIBRARY DESTINATION ${IE_CPACK_RUNTIME_PATH} COMPONENT core)
+            LIBRARY DESTINATION ${IE_CPACK_LIBRARY_PATH} COMPONENT core)
 else()
     ov_install_static_lib(${TARGET_NAME} core)
 endif()
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 86b195ee1c..867121ee50 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -127,7 +127,7 @@ target_include_directories(ngraph INTERFACE $<BUILD_INTERFACE:${OV_CORE_INCLUDE_
 #-----------------------------------------------------------------------------------------------
 
 install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/
-        DESTINATION "runtime/include"
+        DESTINATION "include"
         COMPONENT core_dev
         FILES_MATCHING
             PATTERN "*.hpp"
@@ -143,5 +143,5 @@ write_basic_package_version_file(${CMAKE_BINARY_DIR}/ngraphConfigVersion.cmake
 
 install(FILES ${CMAKE_BINARY_DIR}/ngraphConfig.cmake
               ${CMAKE_BINARY_DIR}/ngraphConfigVersion.cmake
-        DESTINATION "runtime/cmake"
+        DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ngraph
         COMPONENT core_dev)
diff --git a/src/inference/CMakeLists.txt b/src/inference/CMakeLists.txt
index 737e7e0027..259d5e141d 100644
--- a/src/inference/CMakeLists.txt
+++ b/src/inference/CMakeLists.txt
@@ -209,7 +209,7 @@ set_target_properties(${TARGET_NAME}_obj
 
 openvino_developer_export_targets(COMPONENT core_legacy TARGETS ${TARGET_NAME}_plugin_api)
 
-install(DIRECTORY "${PUBLIC_HEADERS_DIR}/" DESTINATION runtime/include
+install(DIRECTORY "${PUBLIC_HEADERS_DIR}/" DESTINATION include
         COMPONENT core_dev)
 
 # Install static libraries for case BUILD_SHARED_LIBS=OFF
diff --git a/src/plugins/intel_gpu/src/kernel_selector/CMakeLists.txt b/src/plugins/intel_gpu/src/kernel_selector/CMakeLists.txt
index 3993bd9731..99287bad51 100644
--- a/src/plugins/intel_gpu/src/kernel_selector/CMakeLists.txt
+++ b/src/plugins/intel_gpu/src/kernel_selector/CMakeLists.txt
@@ -94,7 +94,7 @@ add_custom_command(
     COMMAND "${CMAKE_COMMAND}" -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/core/cache/cache.json ${TUNING_CACHE_PATH}/cache.json)
 
 install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/core/cache/cache.json
-        DESTINATION ${IE_CPACK_RUNTIME_PATH}
+        DESTINATION ${IE_CPACK_LIBRARY_PATH}
         COMPONENT gpu)
 
 ov_install_static_lib(${TARGET_NAME} gpu)
diff --git a/src/plugins/intel_myriad/myriad_dependencies.cmake b/src/plugins/intel_myriad/myriad_dependencies.cmake
index 480acc05d1..5849f55878 100644
--- a/src/plugins/intel_myriad/myriad_dependencies.cmake
+++ b/src/plugins/intel_myriad/myriad_dependencies.cmake
@@ -80,7 +80,7 @@ foreach(firmware_name IN LISTS VPU_SUPPORTED_FIRMWARES)
         VERBATIM)
 
     install(FILES ${${var_name}}
-            DESTINATION ${IE_CPACK_RUNTIME_PATH}
+            DESTINATION ${IE_CPACK_LIBRARY_PATH}
             COMPONENT myriad)
 
     if(ENABLE_INTEL_MYRIAD AND ENABLE_BEH_TESTS)
diff --git a/src/plugins/intel_myriad/myriad_plugin/CMakeLists.txt b/src/plugins/intel_myriad/myriad_plugin/CMakeLists.txt
index d8ebea0bfc..66b5a3d462 100644
--- a/src/plugins/intel_myriad/myriad_plugin/CMakeLists.txt
+++ b/src/plugins/intel_myriad/myriad_plugin/CMakeLists.txt
@@ -56,6 +56,6 @@ set_target_properties(${TARGET_NAME} PROPERTIES INTERPROCEDURAL_OPTIMIZATION_REL
 
 if(LINUX)
     install(FILES ${mvnc_SOURCE_DIR}/src/97-myriad-usbboot.rules
-            DESTINATION install_dependencies
+	    DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/udev/rules.d
             COMPONENT myriad)
 endif()
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index 2fe0fd9742..234110b7d4 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -20,7 +20,7 @@ endif()
 ie_cpack_add_component(deployment_manager REQUIRED)
 
 install(DIRECTORY deployment_manager
-        DESTINATION tools
+        DESTINATION share/openvino/tools
         COMPONENT deployment_manager
         USE_SOURCE_PERMISSIONS)
 
diff --git a/tools/compile_tool/CMakeLists.txt b/tools/compile_tool/CMakeLists.txt
index d19eb5cc14..9fc929cbb0 100644
--- a/tools/compile_tool/CMakeLists.txt
+++ b/tools/compile_tool/CMakeLists.txt
@@ -38,9 +38,9 @@ add_cpplint_target(${TARGET_NAME}_cpplint FOR_TARGETS ${TARGET_NAME})
 ie_cpack_add_component(core_tools DEPENDS core)
 
 install(TARGETS compile_tool
-        RUNTIME DESTINATION tools/compile_tool
+        RUNTIME DESTINATION bin
         COMPONENT core_tools)
 
-install(FILES README.md
-        DESTINATION tools/compile_tool
-        COMPONENT core_tools)
+#install(FILES README.md
+#        DESTINATION tools/compile_tool
+#        COMPONENT core_tools)
-- 
2.37.3