@@ -16,25 +16,27 @@ macro(ie_fail)
16
16
endmacro ()
17
17
18
18
if (NOT HAVE_CXX11 )
19
+ message (WARNING "DL Inference engine requires C++11. You can turn it on via ENABLE_CXX11=ON CMake flag." )
19
20
ie_fail ()
20
21
endif ()
21
22
23
+ ocv_check_environment_variables (INTEL_CVSDK_DIR INF_ENGINE_ROOT_DIR IE_PLUGINS_PATH )
24
+
22
25
if (NOT INF_ENGINE_ROOT_DIR OR NOT EXISTS "${INF_ENGINE_ROOT_DIR} /include/inference_engine.hpp" )
23
26
set (ie_root_paths "${INF_ENGINE_ROOT_DIR} " )
24
- if (DEFINED ENV{INTEL_CVSDK_DIR} )
25
- list (APPEND ie_root_paths "$ENV{INTEL_CVSDK_DIR} " )
26
- list (APPEND ie_root_paths "$ENV{INTEL_CVSDK_DIR} /inference_engine" )
27
- endif ()
28
27
if (DEFINED INTEL_CVSDK_DIR )
29
- list (APPEND ie_root_paths "${INTEL_CVSDK_DIR} " )
30
- list (APPEND ie_root_paths "${INTEL_CVSDK_DIR} /inference_engine" )
28
+ list (APPEND ie_root_paths "${INTEL_CVSDK_DIR} / " )
29
+ list (APPEND ie_root_paths "${INTEL_CVSDK_DIR} /deployment_tools/ inference_engine" )
31
30
endif ()
32
31
33
32
if (NOT ie_root_paths )
34
- list (APPEND ie_root_paths "/opt/intel/deeplearning_deploymenttoolkit /deployment_tools/inference_engine" )
33
+ list (APPEND ie_root_paths "/opt/intel/computer_vision_sdk /deployment_tools/inference_engine/ " )
35
34
endif ()
36
35
37
36
find_path (INF_ENGINE_ROOT_DIR include /inference_engine.hpp PATHS ${ie_root_paths} )
37
+ if (INF_ENGINE_ROOT_DIR MATCHES "-NOTFOUND$" )
38
+ unset (INF_ENGINE_ROOT_DIR CACHE )
39
+ endif ()
38
40
endif ()
39
41
40
42
set (INF_ENGINE_INCLUDE_DIRS "${INF_ENGINE_ROOT_DIR} /include" CACHE PATH "Path to Inference Engine include directory" )
@@ -43,26 +45,27 @@ if(NOT INF_ENGINE_ROOT_DIR
43
45
OR NOT EXISTS "${INF_ENGINE_ROOT_DIR} "
44
46
OR NOT EXISTS "${INF_ENGINE_ROOT_DIR} /include/inference_engine.hpp"
45
47
)
48
+ message (WARNING "DL IE: Can't detect INF_ENGINE_ROOT_DIR location." )
46
49
ie_fail ()
47
50
endif ()
48
51
49
52
set (INF_ENGINE_LIBRARIES "" )
50
53
51
54
set (ie_lib_list inference_engine )
52
55
56
+ if (NOT IS_ABSOLUTE "${IE_PLUGINS_PATH} " )
57
+ set (IE_PLUGINS_PATH "${INF_ENGINE_ROOT_DIR} /${IE_PLUGINS_PATH} " )
58
+ endif ()
59
+
53
60
link_directories (
54
- ${INTEL_CVSDK_DIR} /inference_engine /external/mkltiny_lnx/lib
55
- ${INTEL_CVSDK_DIR} /inference_engine /external/cldnn/lib
61
+ ${INF_ENGINE_ROOT_DIR} /external/mkltiny_lnx/lib
62
+ ${INF_ENGINE_ROOT_DIR} /external/cldnn/lib
56
63
)
57
64
58
65
foreach (lib ${ie_lib_list} )
59
- find_library (${lib}
60
- NAMES ${lib}
61
- # For inference_engine
62
- HINTS ${IE_PLUGINS_PATH}
63
- HINTS "$ENV{IE_PLUGINS_PATH} "
64
- )
66
+ find_library (${lib} NAMES ${lib} HINTS ${IE_PLUGINS_PATH} )
65
67
if (NOT ${lib} )
68
+ message (WARNING "DL IE: Can't find library: '${lib} '" )
66
69
ie_fail ()
67
70
endif ()
68
71
list (APPEND INF_ENGINE_LIBRARIES ${${lib}} )
0 commit comments