[Dist/Tizen] Replace patch file resolving dependency on TBB with new one 00/220700/2
authorWook Song <wook16.song@samsung.com>
Thu, 19 Dec 2019 07:37:59 +0000 (16:37 +0900)
committerWook Song <wook16.song@samsung.com>
Fri, 20 Dec 2019 09:20:01 +0000 (18:20 +0900)
This patch replaces the patch file that resolves build dependency on TBB
with a new one.

Change-Id: I3eb7c81d22e02c0a9378620e8cd47ffa1b0aeaec
Signed-off-by: Wook Song <wook16.song@samsung.com>
packaging/0002-CMake-Add-a-variable-to-resolve-dependency-on-TBB-us.patch

index 58b4805..49d7516 100644 (file)
@@ -1,16 +1,18 @@
-From 65cf6a4b47ac7ec376e29808e9b48758b84d8e47 Mon Sep 17 00:00:00 2001
+From cecdd587a8a62d979b8391fba29bae21bf7d2027 Mon Sep 17 00:00:00 2001
 From: Wook Song <wook16.song@samsung.com>
 Date: Wed, 13 Nov 2019 14:57:03 +0900
-Subject: [PATCH 2/3] [CMake] Add a variable to resolve dependency on TBB using
+Subject: [PATCH 2/2] [CMake] Add a variable to resolve dependency on TBB using
  system library
 
 In order to resolve the build dependency on TBB using one installed in
 the system, this patch adds a variable to the dependencies.cmake file.
 
+Change-Id: Ie07a0ce99c7539687b2d2059377da464b9159c8e
 Signed-off-by: Wook Song <wook16.song@samsung.com>
 ---
  inference-engine/cmake/dependencies.cmake | 21 +++++++++++++++------
- 1 file changed, 15 insertions(+), 6 deletions(-)
+ inference-engine/cmake/ie_parallel.cmake  | 10 ++++++++--
+ 2 files changed, 23 insertions(+), 8 deletions(-)
 
 diff --git a/inference-engine/cmake/dependencies.cmake b/inference-engine/cmake/dependencies.cmake
 index 89d0c41f..561b057a 100644
@@ -58,6 +60,27 @@ index 89d0c41f..561b057a 100644
  endif ()
  
  if (ENABLE_OPENCV)
+diff --git a/inference-engine/cmake/ie_parallel.cmake b/inference-engine/cmake/ie_parallel.cmake
+index 97e8c5e9..f8151a87 100644
+--- a/inference-engine/cmake/ie_parallel.cmake
++++ b/inference-engine/cmake/ie_parallel.cmake
+@@ -36,8 +36,14 @@ function(set_ie_threading_interface_for TARGET_NAME)
+             endif ()
+             if (NOT TBB_INCLUDE_DIRS OR NOT TBB_LIBRARIES_RELEASE)
+-                find_path(TBB_INCLUDE_DIRS tbb/tbb.h ${incl_path} NO_DEFAULT_PATH)
+-                find_library(TBB_LIBRARIES_RELEASE tbb ${lib_rel_path} NO_DEFAULT_PATH)
++                if (USE_TBB_SYSTEM_DEPS)
++                    pkg_search_module(SYSTEM_TBB REQUIRED libtbb)
++                    set(incl_path ${SYSTEM_TBB_INCLUDE_DIRS})
++                    set(TBB_LIBRARIES_RELEASE ${SYSTEM_TBB_LIBRARIES})
++                else ()
++                    find_path(TBB_INCLUDE_DIRS tbb/tbb.h ${incl_path} NO_DEFAULT_PATH)
++                    find_library(TBB_LIBRARIES_RELEASE tbb ${lib_rel_path} NO_DEFAULT_PATH)
++                endif ()
+                 ext_message(STATUS "TBB include: ${TBB_INCLUDE_DIRS}")
+                 ext_message(STATUS "TBB Release lib: ${TBB_LIBRARIES_RELEASE}")
+                 if (NOT LINUX)
 -- 
 2.17.1