Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
60994389
Commit
60994389
authored
Jul 16, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11985 from alalek:cmake_update_inference_engine_detection
parents
a5e8ae21
014ae553
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
15 deletions
+18
-15
OpenCVDetectInferenceEngine.cmake
cmake/OpenCVDetectInferenceEngine.cmake
+18
-15
No files found.
cmake/OpenCVDetectInferenceEngine.cmake
View file @
60994389
...
...
@@ -16,25 +16,27 @@ macro(ie_fail)
endmacro
()
if
(
NOT HAVE_CXX11
)
message
(
WARNING
"DL Inference engine requires C++11. You can turn it on via ENABLE_CXX11=ON CMake flag."
)
ie_fail
()
endif
()
ocv_check_environment_variables
(
INTEL_CVSDK_DIR INF_ENGINE_ROOT_DIR IE_PLUGINS_PATH
)
if
(
NOT INF_ENGINE_ROOT_DIR OR NOT EXISTS
"
${
INF_ENGINE_ROOT_DIR
}
/include/inference_engine.hpp"
)
set
(
ie_root_paths
"
${
INF_ENGINE_ROOT_DIR
}
"
)
if
(
DEFINED ENV{INTEL_CVSDK_DIR}
)
list
(
APPEND ie_root_paths
"$ENV{INTEL_CVSDK_DIR}"
)
list
(
APPEND ie_root_paths
"$ENV{INTEL_CVSDK_DIR}/inference_engine"
)
endif
()
if
(
DEFINED INTEL_CVSDK_DIR
)
list
(
APPEND ie_root_paths
"
${
INTEL_CVSDK_DIR
}
"
)
list
(
APPEND ie_root_paths
"
${
INTEL_CVSDK_DIR
}
/inference_engine"
)
list
(
APPEND ie_root_paths
"
${
INTEL_CVSDK_DIR
}
/
"
)
list
(
APPEND ie_root_paths
"
${
INTEL_CVSDK_DIR
}
/
deployment_tools/
inference_engine"
)
endif
()
if
(
NOT ie_root_paths
)
list
(
APPEND ie_root_paths
"/opt/intel/
deeplearning_deploymenttoolkit/deployment_tools/inference_engine
"
)
list
(
APPEND ie_root_paths
"/opt/intel/
computer_vision_sdk/deployment_tools/inference_engine/
"
)
endif
()
find_path
(
INF_ENGINE_ROOT_DIR include/inference_engine.hpp PATHS
${
ie_root_paths
}
)
if
(
INF_ENGINE_ROOT_DIR MATCHES
"-NOTFOUND$"
)
unset
(
INF_ENGINE_ROOT_DIR CACHE
)
endif
()
endif
()
set
(
INF_ENGINE_INCLUDE_DIRS
"
${
INF_ENGINE_ROOT_DIR
}
/include"
CACHE PATH
"Path to Inference Engine include directory"
)
...
...
@@ -43,6 +45,7 @@ if(NOT INF_ENGINE_ROOT_DIR
OR NOT EXISTS
"
${
INF_ENGINE_ROOT_DIR
}
"
OR NOT EXISTS
"
${
INF_ENGINE_ROOT_DIR
}
/include/inference_engine.hpp"
)
message
(
WARNING
"DL IE: Can't detect INF_ENGINE_ROOT_DIR location."
)
ie_fail
()
endif
()
...
...
@@ -50,19 +53,19 @@ set(INF_ENGINE_LIBRARIES "")
set
(
ie_lib_list inference_engine
)
if
(
NOT IS_ABSOLUTE
"
${
IE_PLUGINS_PATH
}
"
)
set
(
IE_PLUGINS_PATH
"
${
INF_ENGINE_ROOT_DIR
}
/
${
IE_PLUGINS_PATH
}
"
)
endif
()
link_directories
(
${
IN
TEL_CVSDK_DIR
}
/inference_engine
/external/mkltiny_lnx/lib
${
IN
TEL_CVSDK_DIR
}
/inference_engine
/external/cldnn/lib
${
IN
F_ENGINE_ROOT_DIR
}
/external/mkltiny_lnx/lib
${
IN
F_ENGINE_ROOT_DIR
}
/external/cldnn/lib
)
foreach
(
lib
${
ie_lib_list
}
)
find_library
(
${
lib
}
NAMES
${
lib
}
# For inference_engine
HINTS
${
IE_PLUGINS_PATH
}
HINTS
"$ENV{IE_PLUGINS_PATH}"
)
find_library
(
${
lib
}
NAMES
${
lib
}
HINTS
${
IE_PLUGINS_PATH
}
)
if
(
NOT
${
lib
}
)
message
(
WARNING
"DL IE: Can't find library: '
${
lib
}
'"
)
ie_fail
()
endif
()
list
(
APPEND INF_ENGINE_LIBRARIES
${${
lib
}}
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment