1 # The script detects Intel(R) Inference Engine installation
4 # INTEL_CVSDK_DIR - Path to Inference Engine root folder
5 # IE_PLUGINS_PATH - Path to folder with Inference Engine plugins
7 # On return this will define:
9 # HAVE_INF_ENGINE - True if Intel Inference Engine was found
10 # INF_ENGINE_INCLUDE_DIRS - Inference Engine include folder
11 # INF_ENGINE_LIBRARIES - Inference Engine libraries and it's dependencies
14 set(HAVE_INF_ENGINE FALSE)
22 if(NOT INF_ENGINE_ROOT_DIR OR NOT EXISTS "${INF_ENGINE_ROOT_DIR}/include/inference_engine.hpp")
23 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")
28 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")
34 list(APPEND ie_root_paths "/opt/intel/deeplearning_deploymenttoolkit/deployment_tools/inference_engine")
37 find_path(INF_ENGINE_ROOT_DIR include/inference_engine.hpp PATHS ${ie_root_paths})
40 set(INF_ENGINE_INCLUDE_DIRS "${INF_ENGINE_ROOT_DIR}/include" CACHE PATH "Path to Inference Engine include directory")
42 if(NOT INF_ENGINE_ROOT_DIR
43 OR NOT EXISTS "${INF_ENGINE_ROOT_DIR}"
44 OR NOT EXISTS "${INF_ENGINE_ROOT_DIR}/include/inference_engine.hpp"
49 set(INF_ENGINE_LIBRARIES "")
51 set(ie_lib_list inference_engine)
54 ${INTEL_CVSDK_DIR}/inference_engine/external/mkltiny_lnx/lib
55 ${INTEL_CVSDK_DIR}/inference_engine/external/cldnn/lib
58 foreach(lib ${ie_lib_list})
61 # For inference_engine
62 HINTS ${IE_PLUGINS_PATH}
63 HINTS "$ENV{IE_PLUGINS_PATH}"
68 list(APPEND INF_ENGINE_LIBRARIES ${${lib}})
71 set(HAVE_INF_ENGINE TRUE)