[meta-intel] [PATCH] dldt-inference-engine: add recipe

Chin Huat Ang chin.huat.ang at intel.com
Thu Sep 26 15:11:51 PDT 2019


This recipe builds the inference engine from opencv/dldt 2019 R1.1
release.

CPU and GPU plugins have been sanity tested to work using
classification_sample. Further fine-tuning is still needed to improve
the performance.

Original patch by Anuj Mittal.

Signed-off-by: Chin Huat Ang <chin.huat.ang at intel.com>
---
 .../opencv/dldt-inference-engine_2019r1.1.bb       |  84 ++++++++++++++++
 ...openmp-compile-option-when-OpenMP-is-used.patch |  23 +++++
 .../files/0001-Supply-firmware-at-build-time.patch |  40 ++++++++
 .../opencv/files/0001-disable-tests.patch          |  36 +++++++
 .../opencv/files/0001-disable-werror.patch         |  78 ++++++++++++++
 recipes-support/opencv/files/0001-fix-openmp.patch |  28 ++++++
 .../files/0001-format_reader-install-library.patch |  23 +++++
 recipes-support/opencv/files/0001-supply-ade.patch |  23 +++++
 .../opencv/files/0001-use-provided-paths.patch     |  30 ++++++
 .../opencv/files/0001-use-system-omp.patch         |  26 +++++
 .../opencv/files/0006-Install-sample-apps.patch    | 112 +++++++++++++++++++++
 .../opencv/files/0017-use-system-pugixml.patch     |  24 +++++
 12 files changed, 527 insertions(+)
 create mode 100644 recipes-support/opencv/dldt-inference-engine_2019r1.1.bb
 create mode 100644 recipes-support/opencv/files/0001-Add-fopenmp-compile-option-when-OpenMP-is-used.patch
 create mode 100644 recipes-support/opencv/files/0001-Supply-firmware-at-build-time.patch
 create mode 100644 recipes-support/opencv/files/0001-disable-tests.patch
 create mode 100644 recipes-support/opencv/files/0001-disable-werror.patch
 create mode 100644 recipes-support/opencv/files/0001-fix-openmp.patch
 create mode 100644 recipes-support/opencv/files/0001-format_reader-install-library.patch
 create mode 100644 recipes-support/opencv/files/0001-supply-ade.patch
 create mode 100644 recipes-support/opencv/files/0001-use-provided-paths.patch
 create mode 100644 recipes-support/opencv/files/0001-use-system-omp.patch
 create mode 100644 recipes-support/opencv/files/0006-Install-sample-apps.patch
 create mode 100644 recipes-support/opencv/files/0017-use-system-pugixml.patch

diff --git a/recipes-support/opencv/dldt-inference-engine_2019r1.1.bb b/recipes-support/opencv/dldt-inference-engine_2019r1.1.bb
new file mode 100644
index 0000000..d6bee47
--- /dev/null
+++ b/recipes-support/opencv/dldt-inference-engine_2019r1.1.bb
@@ -0,0 +1,84 @@
+SUMMARY = "OpenVINO(TM) Toolkit - Deep Learning Deployment Toolkit"
+HOMEPAGE = "https://github.com/opencv/dldt"
+DESCRIPTION = "This toolkit allows developers to deploy pre-trained \
+deep learning models through a high-level C++ Inference Engine API \
+integrated with application logic."
+
+SRC_URI = "git://github.com/opencv/dldt.git;protocol=git;branch=2019 \
+           https://download.01.org/opencv/2019/openvinotoolkit/R1/inference_engine/firmware_ma2450_491.zip;name=ma2450 \
+           https://download.01.org/opencv/2019/openvinotoolkit/R1/inference_engine/firmware_ma2480_mdk_R7_9.zip;name=ma2480 \
+           file://0001-fix-openmp.patch;patchdir=../ \
+           file://0001-supply-ade.patch;patchdir=../ \
+           file://0001-use-system-omp.patch;patchdir=../ \
+           file://0001-Supply-firmware-at-build-time.patch;patchdir=../ \
+           file://0001-use-provided-paths.patch;patchdir=../ \
+           file://0001-disable-tests.patch;patchdir=../ \
+           file://0001-disable-werror.patch;patchdir=../ \
+           file://0006-Install-sample-apps.patch;patchdir=../ \
+           file://0017-use-system-pugixml.patch;patchdir=../ \
+           file://0001-format_reader-install-library.patch;patchdir=../ \
+           file://0001-Add-fopenmp-compile-option-when-OpenMP-is-used.patch;patchdir=../ \
+           "
+SRCREV = "0ef92871b6dd9a9ceed16d184c4595d2618d526f"
+
+SRC_URI[ma2450.md5sum] = "2886778e21ff3713b3ac69e3f43a1da8"
+SRC_URI[ma2450.sha256sum] = "070c57192fa1d4c17c5b2ebf98ebc35323c5617d1d6ccc454308b33a7476c45b"
+
+SRC_URI[ma2480.md5sum] = "a65e0ceab3a33bfe6eff58f2291cecec"
+SRC_URI[ma2480.sha256sum] = "a8231f4f68a1f8eab99d003a43756a23079699be379b64dacf66ad4912a607b3"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://../LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
+
+inherit cmake
+
+S = "${WORKDIR}/git/inference-engine"
+
+EXTRA_OECMAKE = " \
+                  -DVPU_FIRMWARE_MA2450_FILE=../mvnc/MvNCAPI-ma2450.mvcmd \
+                  -DVPU_FIRMWARE_MA2480_FILE=../mvnc/MvNCAPI-ma2480.mvcmd \
+                  -DENABLE_INTEL_OMP=0 \
+                  -DENABLE_OPENCV=1 \
+                  -DENABLE_SAMPLES_CORE=1 \
+                  -DENABLE_PLUGIN_RPATH=0 \
+                  -DENABLE_GNA=0 \
+                  -DPYTHON_EXECUTABLE=${HOSTTOOLS_DIR}/python2 \
+                  -DTHREADING=OMP \
+                  -DCMAKE_INSTALL_LOCAL_ONLY=OFF \
+                  -DCMAKE_BUILD_TYPE=DebugWithRelInfo \
+                  --debug-output \
+                  "
+
+DEPENDS += "libusb1 ade mkl-dnn opencv pugixml"
+
+PACKAGECONFIG[intel-compute-runtime] = "-DENABLE_CLDNN=1,-DENABLE_CLDNN=0,opencl-icd-loader,opencl-icd-loader intel-compute-runtime"
+
+PACKAGECONFIG ?= "intel-compute-runtime"
+
+# Workaround issue where cmake build isn't configured to support SOVERSION
+FILES_${PN}_append = " ${libdir}/lib*${SOLIBSDEV}"
+FILES_${PN}-dev_remove = "${libdir}/lib*${SOLIBSDEV}"
+
+# Move inference engine samples into a separate package
+PACKAGES =+ "${PN}-samples"
+FILES_${PN}-samples = "${bindir}/*"
+
+do_install_append () {
+
+    # Workaround cmake build issue where the libraries are not properly
+    # installed, eventually these should be fixed in inference engine's
+    # cmake build.
+
+    install ${B}/src/extension/libcpu_extension.so ${D}${libdir}
+    install ${B}/src/vpu/myriad_plugin/libmyriadPlugin.so ${D}${libdir}
+    install ${B}/src/inference_engine/libinference_engine.so ${D}${libdir}
+    install ${B}/src/hetero_plugin/libHeteroPlugin.so ${D}${libdir}
+    install ${B}/src/mkldnn_plugin/libMKLDNNPlugin.so ${D}${libdir}
+
+    # libclDNNPlugin.so only exists when PACKAGECONFIG intel-compute-runtime
+    # is set (-DENABLE_CLDNN=1)
+    if [ -f ${B}/src/cldnn_engine/libclDNNPlugin.so ]; then
+        install ${B}/src/cldnn_engine/libclDNNPlugin.so ${D}${libdir}
+    fi
+
+}
diff --git a/recipes-support/opencv/files/0001-Add-fopenmp-compile-option-when-OpenMP-is-used.patch b/recipes-support/opencv/files/0001-Add-fopenmp-compile-option-when-OpenMP-is-used.patch
new file mode 100644
index 0000000..1aefb44
--- /dev/null
+++ b/recipes-support/opencv/files/0001-Add-fopenmp-compile-option-when-OpenMP-is-used.patch
@@ -0,0 +1,23 @@
+From af36dc5aaee7a399da23d857feebac62be4827a4 Mon Sep 17 00:00:00 2001
+From: Chin Huat Ang <chin.huat.ang at intel.com>
+Date: Wed, 28 Aug 2019 13:36:10 +0800
+Subject: [PATCH] Add -fopenmp compile option when OpenMP is used
+
+Signed-off-by: Chin Huat Ang <chin.huat.ang at intel.com>
+
+---
+ inference-engine/src/mkldnn_plugin/CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/inference-engine/src/mkldnn_plugin/CMakeLists.txt b/inference-engine/src/mkldnn_plugin/CMakeLists.txt
+index df81a5a..96c7f1c 100644
+--- a/inference-engine/src/mkldnn_plugin/CMakeLists.txt
++++ b/inference-engine/src/mkldnn_plugin/CMakeLists.txt
+@@ -50,6 +50,7 @@ if (THREADING STREQUAL "TBB")
+     set(MKLDNN_THR MKLDNN_THR_TBB)
+ elseif (THREADING STREQUAL "OMP")
+     set(MKLDNN_THR MKLDNN_THR_OMP)
++    target_link_options(${TARGET_NAME} PRIVATE -fopenmp)
+ else()
+     set(MKLDNN_THR MKLDNN_THR_SEQ)
+ endif()
diff --git a/recipes-support/opencv/files/0001-Supply-firmware-at-build-time.patch b/recipes-support/opencv/files/0001-Supply-firmware-at-build-time.patch
new file mode 100644
index 0000000..693f798
--- /dev/null
+++ b/recipes-support/opencv/files/0001-Supply-firmware-at-build-time.patch
@@ -0,0 +1,40 @@
+From e58226a399be7cf2cc6d91b66facb65d7dfb5018 Mon Sep 17 00:00:00 2001
+From: Anuj Mittal <anuj.mittal at intel.com>
+Date: Tue, 20 Aug 2019 15:40:18 +0800
+Subject: [PATCH] Supply firmware at build time
+
+Signed-off-by: Anuj Mittal <anuj.mittal at intel.com>
+
+---
+ inference-engine/cmake/dependencies.cmake | 18 ------------------
+ 1 file changed, 18 deletions(-)
+
+diff --git a/inference-engine/cmake/dependencies.cmake b/inference-engine/cmake/dependencies.cmake
+index 64435ca..217fbc9 100644
+--- a/inference-engine/cmake/dependencies.cmake
++++ b/inference-engine/cmake/dependencies.cmake
+@@ -37,24 +37,6 @@ else()
+     set(MODELS_BRANCH "master")
+ endif()
+ 
+-if (ENABLE_MYRIAD)
+-    RESOLVE_DEPENDENCY(VPU_FIRMWARE_MA2450
+-            ARCHIVE_UNIFIED firmware_ma2450_491.zip
+-            TARGET_PATH "${TEMP}/vpu/firmware/ma2450"
+-            ENVIRONMENT "VPU_FIRMWARE_MA2450"
+-            FOLDER)
+-    debug_message(STATUS "ma2450=" ${VPU_FIRMWARE_MA2450})
+-endif ()
+-
+-if (ENABLE_MYRIAD)
+-    RESOLVE_DEPENDENCY(VPU_FIRMWARE_MA2480
+-            ARCHIVE_UNIFIED firmware_ma2480_mdk_R7_9.zip
+-            TARGET_PATH "${TEMP}/vpu/firmware/ma2480"
+-            ENVIRONMENT "VPU_FIRMWARE_MA2480"
+-            FOLDER)
+-    debug_message(STATUS "ma2480=" ${VPU_FIRMWARE_MA2480})
+-endif ()
+-
+ ## enable cblas_gemm from OpenBLAS package
+ if (GEMM STREQUAL "OPENBLAS")
+ if(NOT BLAS_LIBRARIES OR NOT BLAS_INCLUDE_DIRS)
diff --git a/recipes-support/opencv/files/0001-disable-tests.patch b/recipes-support/opencv/files/0001-disable-tests.patch
new file mode 100644
index 0000000..af57416
--- /dev/null
+++ b/recipes-support/opencv/files/0001-disable-tests.patch
@@ -0,0 +1,36 @@
+From 888db5ced39bba933753c7f8b0b0ef4f900578a9 Mon Sep 17 00:00:00 2001
+From: Anuj Mittal <anuj.mittal at intel.com>
+Date: Tue, 27 Aug 2019 08:06:46 +0800
+Subject: [PATCH] disable tests
+
+Signed-off-by: Anuj Mittal <anuj.mittal at intel.com>
+
+---
+ inference-engine/CMakeLists.txt         | 1 -
+ inference-engine/samples/CMakeLists.txt | 1 -
+ 2 files changed, 2 deletions(-)
+
+diff --git a/inference-engine/CMakeLists.txt b/inference-engine/CMakeLists.txt
+index 9e15382..bdf874e 100644
+--- a/inference-engine/CMakeLists.txt
++++ b/inference-engine/CMakeLists.txt
+@@ -131,7 +131,6 @@ include(CheckCXXCompilerFlag)
+ include(cpplint)
+ 
+ add_subdirectory(src)
+-add_subdirectory(tests)
+ add_subdirectory(thirdparty)
+ set(InferenceEngine_DIR "${CMAKE_BINARY_DIR}")
+ 
+diff --git a/inference-engine/samples/CMakeLists.txt b/inference-engine/samples/CMakeLists.txt
+index 4e13c11..a8a9946 100644
+--- a/inference-engine/samples/CMakeLists.txt
++++ b/inference-engine/samples/CMakeLists.txt
+@@ -93,7 +93,6 @@ set (GFLAGS_IS_SUBPROJECT TRUE)
+ set (HAVE_SYS_STAT_H 1)
+ set (HAVE_INTTYPES_H 1)
+ 
+-add_subdirectory(thirdparty/gflags)
+ 
+ if (${CMAKE_CXX_COMPILER_ID} STREQUAL GNU)
+     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
diff --git a/recipes-support/opencv/files/0001-disable-werror.patch b/recipes-support/opencv/files/0001-disable-werror.patch
new file mode 100644
index 0000000..ac6f72b
--- /dev/null
+++ b/recipes-support/opencv/files/0001-disable-werror.patch
@@ -0,0 +1,78 @@
+From 434cf332e8c368b626d230b79e8dccecf2b0525b Mon Sep 17 00:00:00 2001
+From: Anuj Mittal <anuj.mittal at intel.com>
+Date: Tue, 20 Aug 2019 19:39:37 +0800
+Subject: [PATCH] disable werror
+
+Signed-off-by: Anuj Mittal <anuj.mittal at intel.com>
+
+---
+ inference-engine/cmake/os_flags.cmake                    | 2 +-
+ inference-engine/samples/CMakeLists.txt                  | 1 -
+ inference-engine/thirdparty/clDNN/CMakeLists.txt         | 2 --
+ inference-engine/thirdparty/mkl-dnn/cmake/platform.cmake | 1 -
+ inference-engine/tools/CMakeLists.txt                    | 2 --
+ 5 files changed, 1 insertion(+), 7 deletions(-)
+
+diff --git a/inference-engine/cmake/os_flags.cmake b/inference-engine/cmake/os_flags.cmake
+index 29608ea..2c189d8 100644
+--- a/inference-engine/cmake/os_flags.cmake
++++ b/inference-engine/cmake/os_flags.cmake
+@@ -28,7 +28,7 @@ if (WIN32)
+     endif()
+ 
+ else()
+-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Werror=return-type ")
++    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=return-type ")
+     if (APPLE)
+         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=unused-command-line-argument")
+     elseif(UNIX)
+diff --git a/inference-engine/samples/CMakeLists.txt b/inference-engine/samples/CMakeLists.txt
+index a8a9946..8ac5454 100644
+--- a/inference-engine/samples/CMakeLists.txt
++++ b/inference-engine/samples/CMakeLists.txt
+@@ -68,7 +68,6 @@ if (WIN32)
+         set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4251 /wd4275 /wd4267") #disable some warnings
+     endif()
+ else()
+-    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") #treating warnings as errors
+     if (APPLE)
+         set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=unused-command-line-argument")
+     elseif(UNIX)
+diff --git a/inference-engine/thirdparty/clDNN/CMakeLists.txt b/inference-engine/thirdparty/clDNN/CMakeLists.txt
+index 624d95c..5646ff1 100644
+--- a/inference-engine/thirdparty/clDNN/CMakeLists.txt
++++ b/inference-engine/thirdparty/clDNN/CMakeLists.txt
+@@ -757,8 +757,6 @@ foreach(__CLDNN_CompilerFlagName IN ITEMS "CMAKE_CXX_FLAGS" "CMAKE_C_FLAGS")
+         MultiProcessorCompilation
+         DeadCodeEliminate
+         ExtensionsEnabled
+-        TreatWarnAsErrorEnabled
+-        WarnLevel4
+         NoFastMath
+         StackProtector
+     )
+diff --git a/inference-engine/thirdparty/mkl-dnn/cmake/platform.cmake b/inference-engine/thirdparty/mkl-dnn/cmake/platform.cmake
+index a541215..bed8a59 100644
+--- a/inference-engine/thirdparty/mkl-dnn/cmake/platform.cmake
++++ b/inference-engine/thirdparty/mkl-dnn/cmake/platform.cmake
+@@ -63,7 +63,6 @@ if(MSVC)
+     endif()
+ elseif(UNIX OR MINGW)
+     append(CMAKE_CCXX_FLAGS "-Wall -Wno-unknown-pragmas")
+-    append_if_product(CMAKE_CCXX_FLAGS "-Werror")
+     append(CMAKE_CCXX_FLAGS "-fvisibility=internal")
+     append(CMAKE_C_FLAGS "-std=c99")
+     append(CMAKE_CXX_FLAGS "-std=c++11 -fvisibility-inlines-hidden")
+diff --git a/inference-engine/tools/CMakeLists.txt b/inference-engine/tools/CMakeLists.txt
+index 13ab365..feacf33 100644
+--- a/inference-engine/tools/CMakeLists.txt
++++ b/inference-engine/tools/CMakeLists.txt
+@@ -23,8 +23,6 @@ endif()
+ 
+ if (WIN32)
+     # add_compile_options("/WX")
+-else()
+-    add_compile_options("-Werror")
+ endif()
+ 
+ add_subdirectory(vpu)
diff --git a/recipes-support/opencv/files/0001-fix-openmp.patch b/recipes-support/opencv/files/0001-fix-openmp.patch
new file mode 100644
index 0000000..e6004e3
--- /dev/null
+++ b/recipes-support/opencv/files/0001-fix-openmp.patch
@@ -0,0 +1,28 @@
+From 3fa81a66a39264ba36c3f289c1e6dbf9f253daf9 Mon Sep 17 00:00:00 2001
+From: Anuj Mittal <anuj.mittal at intel.com>
+Date: Tue, 20 Aug 2019 12:20:33 +0800
+Subject: [PATCH] fix openmp
+
+Signed-off-by: Anuj Mittal <anuj.mittal at intel.com>
+
+---
+ inference-engine/cmake/dependencies.cmake | 6 +-----
+ 1 file changed, 1 insertion(+), 5 deletions(-)
+
+diff --git a/inference-engine/cmake/dependencies.cmake b/inference-engine/cmake/dependencies.cmake
+index d3cdf95..64435ca 100644
+--- a/inference-engine/cmake/dependencies.cmake
++++ b/inference-engine/cmake/dependencies.cmake
+@@ -86,11 +86,7 @@ if (WIN32)
+             ENVIRONMENT "OMP"
+             VERSION_REGEX ".*_([a-z]*_([a-z0-9]+\\.)*[0-9]+).*")
+ elseif(LINUX)
+-    RESOLVE_DEPENDENCY(OMP
+-            ARCHIVE_LIN "iomp.tgz"
+-            TARGET_PATH "${TEMP}/omp"
+-            ENVIRONMENT "OMP"
+-            VERSION_REGEX ".*_([a-z]*_([a-z0-9]+\\.)*[0-9]+).*")
++    set(OMP "-fopenmp")
+ else(APPLE)
+     RESOLVE_DEPENDENCY(OMP
+             ARCHIVE_MAC "iomp_20190130_mac.tgz"
diff --git a/recipes-support/opencv/files/0001-format_reader-install-library.patch b/recipes-support/opencv/files/0001-format_reader-install-library.patch
new file mode 100644
index 0000000..504d433
--- /dev/null
+++ b/recipes-support/opencv/files/0001-format_reader-install-library.patch
@@ -0,0 +1,23 @@
+From f12edc7ee913971ab7cab68b5994bd3bd2880530 Mon Sep 17 00:00:00 2001
+From: Chin Huat Ang <chin.huat.ang at intel.com>
+Date: Tue, 27 Aug 2019 06:51:42 +0800
+Subject: [PATCH] format_reader: install library
+
+Signed-off-by: Chin Huat Ang <chin.huat.ang at intel.com>
+
+---
+ inference-engine/samples/common/format_reader/CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/inference-engine/samples/common/format_reader/CMakeLists.txt b/inference-engine/samples/common/format_reader/CMakeLists.txt
+index e3ecd58..cc30fec 100644
+--- a/inference-engine/samples/common/format_reader/CMakeLists.txt
++++ b/inference-engine/samples/common/format_reader/CMakeLists.txt
+@@ -35,6 +35,7 @@ source_group("include" FILES ${LIBRARY_HEADERS})
+ 
+ # Create library file from sources.
+ add_library(${TARGET_NAME} SHARED ${MAIN_SRC} ${LIBRARY_HEADERS})
++install(TARGETS ${TARGET_NAME} DESTINATION lib)
+ target_link_libraries(${TARGET_NAME} ${OpenCV_LIBRARIES})
+ 
+ if(CMAKE_VERSION VERSION_LESS "2.8.11")
diff --git a/recipes-support/opencv/files/0001-supply-ade.patch b/recipes-support/opencv/files/0001-supply-ade.patch
new file mode 100644
index 0000000..8c9a85f
--- /dev/null
+++ b/recipes-support/opencv/files/0001-supply-ade.patch
@@ -0,0 +1,23 @@
+From 9309c0958b2533a91640e3669e83a6571a230568 Mon Sep 17 00:00:00 2001
+From: Anuj Mittal <anuj.mittal at intel.com>
+Date: Tue, 20 Aug 2019 12:40:09 +0800
+Subject: [PATCH] supply ade
+
+Signed-off-by: Anuj Mittal <anuj.mittal at intel.com>
+
+---
+ inference-engine/thirdparty/CMakeLists.txt | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/inference-engine/thirdparty/CMakeLists.txt b/inference-engine/thirdparty/CMakeLists.txt
+index f65f38c..c8b0bf9 100644
+--- a/inference-engine/thirdparty/CMakeLists.txt
++++ b/inference-engine/thirdparty/CMakeLists.txt
+@@ -11,7 +11,6 @@ add_subdirectory(pugixml)
+ export(TARGETS pugixml NAMESPACE IE:: APPEND FILE "${CMAKE_BINARY_DIR}/targets.cmake")
+ 
+ add_subdirectory(stb_lib)
+-add_subdirectory(ade)
+ 
+ if (ENABLE_CLDNN)
+     set(CLDNN__OUTPUT_BIN_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
diff --git a/recipes-support/opencv/files/0001-use-provided-paths.patch b/recipes-support/opencv/files/0001-use-provided-paths.patch
new file mode 100644
index 0000000..15bb8bc
--- /dev/null
+++ b/recipes-support/opencv/files/0001-use-provided-paths.patch
@@ -0,0 +1,30 @@
+From 3700b244d0906f339f33bcdbfc198f3ba97bf1a0 Mon Sep 17 00:00:00 2001
+From: Anuj Mittal <anuj.mittal at intel.com>
+Date: Tue, 20 Aug 2019 15:58:04 +0800
+Subject: [PATCH] use provided paths
+
+Signed-off-by: Anuj Mittal <anuj.mittal at intel.com>
+
+---
+ inference-engine/CMakeLists.txt | 8 --------
+ 1 file changed, 8 deletions(-)
+
+diff --git a/inference-engine/CMakeLists.txt b/inference-engine/CMakeLists.txt
+index 1c3d6ea..9e15382 100644
+--- a/inference-engine/CMakeLists.txt
++++ b/inference-engine/CMakeLists.txt
+@@ -99,14 +99,6 @@ if(NOT(UNIX))
+     set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER})
+     set (LIBRARY_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER})
+     set (LIBRARY_OUTPUT_PATH ${LIBRARY_OUTPUT_DIRECTORY}) # compatibility issue: linux uses LIBRARY_OUTPUT_PATH, windows uses LIBRARY_OUTPUT_DIRECTORY
+-else ()
+-    set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER}/${IE_BUILD_CONFIGURATION}/lib)
+-    set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER}/${IE_BUILD_CONFIGURATION}/lib)
+-    set (CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER}/${IE_BUILD_CONFIGURATION})
+-    set (CMAKE_PDB_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER}/${IE_BUILD_CONFIGURATION})
+-    set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER}/${IE_BUILD_CONFIGURATION})
+-    set (LIBRARY_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER}/${IE_BUILD_CONFIGURATION}/lib)
+-    set (LIBRARY_OUTPUT_PATH ${LIBRARY_OUTPUT_DIRECTORY}/lib)
+ endif()
+ 
+ if (APPLE)
diff --git a/recipes-support/opencv/files/0001-use-system-omp.patch b/recipes-support/opencv/files/0001-use-system-omp.patch
new file mode 100644
index 0000000..cc14a54
--- /dev/null
+++ b/recipes-support/opencv/files/0001-use-system-omp.patch
@@ -0,0 +1,26 @@
+From 18e337ce9084180669600d1ff4bab3ec685e6964 Mon Sep 17 00:00:00 2001
+From: Anuj Mittal <anuj.mittal at intel.com>
+Date: Tue, 20 Aug 2019 15:37:18 +0800
+Subject: [PATCH] use system omp
+
+Signed-off-by: Anuj Mittal <anuj.mittal at intel.com>
+
+---
+ inference-engine/cmake/ie_parallel.cmake | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/inference-engine/cmake/ie_parallel.cmake b/inference-engine/cmake/ie_parallel.cmake
+index 18ccdf0..2738ee5 100644
+--- a/inference-engine/cmake/ie_parallel.cmake
++++ b/inference-engine/cmake/ie_parallel.cmake
+@@ -68,8 +68,8 @@ function(set_ie_threading_interface_for TARGET_NAME)
+         endif ()
+ 
+         if (NOT OMP_LIBRARIES_RELEASE OR NOT OMP_LIBRARIES_DEBUG)
+-            find_library(OMP_LIBRARIES_RELEASE ${omp_lib_name} ${lib_rel_path} NO_DEFAULT_PATH)
+-            find_library(OMP_LIBRARIES_DEBUG ${omp_lib_name} ${lib_dbg_path} NO_DEFAULT_PATH)
++            find_library(OMP_LIBRARIES_RELEASE ${omp_lib_name})
++            find_library(OMP_LIBRARIES_DEBUG ${omp_lib_name})
+             ext_message(STATUS "OMP Release lib: ${OMP_LIBRARIES_RELEASE}")
+             ext_message(STATUS "OMP Debug lib: ${OMP_LIBRARIES_DEBUG}")
+         endif ()
diff --git a/recipes-support/opencv/files/0006-Install-sample-apps.patch b/recipes-support/opencv/files/0006-Install-sample-apps.patch
new file mode 100644
index 0000000..d1ecf48
--- /dev/null
+++ b/recipes-support/opencv/files/0006-Install-sample-apps.patch
@@ -0,0 +1,112 @@
+From 91a5af1d3e11d70a3b33fab52d4ef74a5d3de85e Mon Sep 17 00:00:00 2001
+From: "Brett T. Warden" <brett.t.warden at intel.com>
+Date: Mon, 28 Jan 2019 13:58:03 -0800
+Subject: [PATCH] Install sample apps
+
+---
+ inference-engine/samples/classification_sample/CMakeLists.txt           | 1 +
+ inference-engine/samples/classification_sample_async/CMakeLists.txt     | 1 +
+ inference-engine/samples/hello_autoresize_classification/CMakeLists.txt | 1 +
+ inference-engine/samples/hello_classification/CMakeLists.txt            | 1 +
+ inference-engine/samples/hello_request_classification/CMakeLists.txt    | 1 +
+ inference-engine/samples/object_detection_sample_ssd/CMakeLists.txt     | 1 +
+ inference-engine/samples/style_transfer_sample/CMakeLists.txt           | 1 +
+ inference-engine/samples/validation_app/CMakeLists.txt                  | 1 +
+ 8 files changed, 8 insertions(+)
+
+diff --git a/inference-engine/samples/classification_sample/CMakeLists.txt b/inference-engine/samples/classification_sample/CMakeLists.txt
+index 1dab0c9..b2c67ea 100644
+--- a/inference-engine/samples/classification_sample/CMakeLists.txt
++++ b/inference-engine/samples/classification_sample/CMakeLists.txt
+@@ -16,6 +16,7 @@ link_directories(${LIB_FOLDER})
+ 
+ # Create library file from sources.
+ add_executable(${TARGET_NAME} ${SRC})
++install(TARGETS ${TARGET_NAME} DESTINATION bin)
+ 
+ set_target_properties(${TARGET_NAME} PROPERTIES "CMAKE_CXX_FLAGS" "${CMAKE_CXX_FLAGS} -fPIE"
+ COMPILE_PDB_NAME ${TARGET_NAME})
+diff --git a/inference-engine/samples/classification_sample_async/CMakeLists.txt b/inference-engine/samples/classification_sample_async/CMakeLists.txt
+index 9e37440..3fc0082 100644
+--- a/inference-engine/samples/classification_sample_async/CMakeLists.txt
++++ b/inference-engine/samples/classification_sample_async/CMakeLists.txt
+@@ -16,6 +16,7 @@ link_directories(${LIB_FOLDER})
+ 
+ # Create library file from sources.
+ add_executable(${TARGET_NAME} ${SRC})
++install(TARGETS ${TARGET_NAME} DESTINATION bin)
+ 
+ set_target_properties(${TARGET_NAME} PROPERTIES "CMAKE_CXX_FLAGS" "${CMAKE_CXX_FLAGS} -fPIE"
+ COMPILE_PDB_NAME ${TARGET_NAME})
+diff --git a/inference-engine/samples/hello_autoresize_classification/CMakeLists.txt b/inference-engine/samples/hello_autoresize_classification/CMakeLists.txt
+index 01deda6..5ef2900 100644
+--- a/inference-engine/samples/hello_autoresize_classification/CMakeLists.txt
++++ b/inference-engine/samples/hello_autoresize_classification/CMakeLists.txt
+@@ -21,6 +21,7 @@ link_directories(${LIB_FOLDER})
+ 
+ # Create library file from sources.
+ add_executable(${TARGET_NAME} ${SRC})
++install(TARGETS ${TARGET_NAME} DESTINATION bin)
+ 
+ set_target_properties(${TARGET_NAME} PROPERTIES "CMAKE_CXX_FLAGS" "${CMAKE_CXX_FLAGS} -fPIE"
+                       COMPILE_PDB_NAME ${TARGET_NAME})
+diff --git a/inference-engine/samples/hello_classification/CMakeLists.txt b/inference-engine/samples/hello_classification/CMakeLists.txt
+index 845f7e9..276be87 100644
+--- a/inference-engine/samples/hello_classification/CMakeLists.txt
++++ b/inference-engine/samples/hello_classification/CMakeLists.txt
+@@ -23,6 +23,7 @@ link_directories(${LIB_FOLDER})
+ 
+ # Create library file from sources.
+ add_executable(${TARGET_NAME} ${SRC})
++install(TARGETS ${TARGET_NAME} DESTINATION bin)
+ 
+ if(WIN32)
+ 	# This target supports UNICODE on Windows
+diff --git a/inference-engine/samples/hello_request_classification/CMakeLists.txt b/inference-engine/samples/hello_request_classification/CMakeLists.txt
+index c7dbb1e..3e5ab8f 100644
+--- a/inference-engine/samples/hello_request_classification/CMakeLists.txt
++++ b/inference-engine/samples/hello_request_classification/CMakeLists.txt
+@@ -23,6 +23,7 @@ link_directories(${LIB_FOLDER})
+ 
+ # Create library file from sources.
+ add_executable(${TARGET_NAME} ${SRC})
++install(TARGETS ${TARGET_NAME} DESTINATION bin)
+ 
+ set_target_properties(${TARGET_NAME} PROPERTIES "CMAKE_CXX_FLAGS" "${CMAKE_CXX_FLAGS} -fPIE"
+ COMPILE_PDB_NAME ${TARGET_NAME})
+diff --git a/inference-engine/samples/object_detection_sample_ssd/CMakeLists.txt b/inference-engine/samples/object_detection_sample_ssd/CMakeLists.txt
+index 436edc2..adba758 100644
+--- a/inference-engine/samples/object_detection_sample_ssd/CMakeLists.txt
++++ b/inference-engine/samples/object_detection_sample_ssd/CMakeLists.txt
+@@ -21,6 +21,7 @@ link_directories(${LIB_FOLDER})
+ 
+ # Create library file from sources.
+ add_executable(${TARGET_NAME} ${MAIN_SRC} ${MAIN_HEADERS})
++install(TARGETS ${TARGET_NAME} DESTINATION bin)
+ 
+ add_dependencies(${TARGET_NAME} gflags)
+ 
+diff --git a/inference-engine/samples/style_transfer_sample/CMakeLists.txt b/inference-engine/samples/style_transfer_sample/CMakeLists.txt
+index ac2a170..d8e624b 100644
+--- a/inference-engine/samples/style_transfer_sample/CMakeLists.txt
++++ b/inference-engine/samples/style_transfer_sample/CMakeLists.txt
+@@ -22,6 +22,7 @@ link_directories(${LIB_FOLDER})
+ 
+ # Create library file from sources.
+ add_executable(${TARGET_NAME} ${MAIN_SRC} ${MAIN_HEADERS})
++install(TARGETS ${TARGET_NAME} DESTINATION bin)
+ 
+ add_dependencies(${TARGET_NAME} gflags)
+ 
+diff --git a/inference-engine/samples/validation_app/CMakeLists.txt b/inference-engine/samples/validation_app/CMakeLists.txt
+index 87b337c..07f48b7 100644
+--- a/inference-engine/samples/validation_app/CMakeLists.txt
++++ b/inference-engine/samples/validation_app/CMakeLists.txt
+@@ -36,6 +36,7 @@ link_directories(${LIB_FOLDER})
+ 
+ # Create library file from sources.
+ add_executable(${TARGET_NAME} ${MAIN_SRC} ${MAIN_HEADERS})
++install(TARGETS ${TARGET_NAME} DESTINATION bin)
+ 
+ set_target_properties(${TARGET_NAME} PROPERTIES "CMAKE_CXX_FLAGS" "${CMAKE_CXX_FLAGS} -fPIE" 
+ COMPILE_PDB_NAME ${TARGET_NAME})
diff --git a/recipes-support/opencv/files/0017-use-system-pugixml.patch b/recipes-support/opencv/files/0017-use-system-pugixml.patch
new file mode 100644
index 0000000..cd9bdfa
--- /dev/null
+++ b/recipes-support/opencv/files/0017-use-system-pugixml.patch
@@ -0,0 +1,24 @@
+From c3857f902d7cde9f839e03f74bab8be9169537e8 Mon Sep 17 00:00:00 2001
+From: Kevron Rees <kevron.m.rees at intel.com>
+Date: Wed, 29 May 2019 11:28:38 -0700
+Subject: [PATCH] use system pugixml
+
+---
+ inference-engine/thirdparty/CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/inference-engine/thirdparty/CMakeLists.txt b/inference-engine/thirdparty/CMakeLists.txt
+index c8b0bf9..7f23e8f 100644
+--- a/inference-engine/thirdparty/CMakeLists.txt
++++ b/inference-engine/thirdparty/CMakeLists.txt
+@@ -7,8 +7,8 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+   set(CMAKE_CC_FLAGS "${CMAKE_CC_FLAGS} -Wno-unknown-warning-option -Wno-inconsistent-missing-override -Wno-pass-failed")
+ endif()
+ 
+-add_subdirectory(pugixml)
+-export(TARGETS pugixml NAMESPACE IE:: APPEND FILE "${CMAKE_BINARY_DIR}/targets.cmake")
++# add_subdirectory(pugixml)
++# export(TARGETS pugixml NAMESPACE IE:: APPEND FILE "${CMAKE_BINARY_DIR}/targets.cmake")
+ 
+ add_subdirectory(stb_lib)
+ 
-- 
2.7.4



More information about the meta-intel mailing list