Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
b82ecaf4
O
Opencv
项目概览
Greenplum
/
Opencv
12 个月 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b82ecaf4
编写于
3月 22, 2019
作者:
A
Alexander Alekhin
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #14125 from alalek:cmake_ie_env_vars
上级
9cef78b6
65fc863d
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
19 addition
and
10 deletion
+19
-10
cmake/OpenCVDetectInferenceEngine.cmake
cmake/OpenCVDetectInferenceEngine.cmake
+19
-10
未找到文件。
cmake/OpenCVDetectInferenceEngine.cmake
浏览文件 @
b82ecaf4
# The script detects Intel(R) Inference Engine installation
# The script detects Intel(R) Inference Engine installation
#
#
# Cache variables:
# Cache variables:
# INF_ENGINE_OMP_DIR - directory with OpenMP library to link with (needed by some versions of IE)
# INF_ENGINE_RELEASE - a number reflecting IE source interface (linked with OpenVINO release)
# INF_ENGINE_RELEASE - a number reflecting IE source interface (linked with OpenVINO release)
#
#
# Detect parameters:
# Detect parameters:
...
@@ -11,8 +10,8 @@
...
@@ -11,8 +10,8 @@
# - INF_ENGINE_INCLUDE_DIRS - headers search location
# - INF_ENGINE_INCLUDE_DIRS - headers search location
# - INF_ENGINE_LIB_DIRS - library search location
# - INF_ENGINE_LIB_DIRS - library search location
# 3. OpenVINO location:
# 3. OpenVINO location:
# - environment variable INTEL_
CVSDK
_DIR is set to location of OpenVINO installation dir
# - environment variable INTEL_
OPENVINO
_DIR is set to location of OpenVINO installation dir
# - INF_ENGINE_PLATFORM - part of name of library directory representing its platform
(default ubuntu_16.04)
# - INF_ENGINE_PLATFORM - part of name of library directory representing its platform
#
#
# Result:
# Result:
# INF_ENGINE_TARGET - set to name of imported library target representing InferenceEngine
# INF_ENGINE_TARGET - set to name of imported library target representing InferenceEngine
...
@@ -36,11 +35,13 @@ function(add_custom_ie_build _inc _lib _lib_rel _lib_dbg _msg)
...
@@ -36,11 +35,13 @@ function(add_custom_ie_build _inc _lib _lib_rel _lib_dbg _msg)
IMPORTED_IMPLIB_DEBUG
"
${
_lib_dbg
}
"
IMPORTED_IMPLIB_DEBUG
"
${
_lib_dbg
}
"
INTERFACE_INCLUDE_DIRECTORIES
"
${
_inc
}
"
INTERFACE_INCLUDE_DIRECTORIES
"
${
_inc
}
"
)
)
find_library
(
omp_lib iomp5 PATHS
"
${
INF_ENGINE_OMP_DIR
}
"
NO_DEFAULT_PATH
)
if
(
NOT INF_ENGINE_RELEASE VERSION_GREATER
"2018050000"
)
if
(
NOT omp_lib
)
find_library
(
INF_ENGINE_OMP_LIBRARY iomp5 PATHS
"
${
INF_ENGINE_OMP_DIR
}
"
NO_DEFAULT_PATH
)
message
(
WARNING
"OpenMP for IE have not been found. Set INF_ENGINE_OMP_DIR variable if you experience build errors."
)
if
(
NOT INF_ENGINE_OMP_LIBRARY
)
else
()
message
(
WARNING
"OpenMP for IE have not been found. Set INF_ENGINE_OMP_DIR variable if you experience build errors."
)
set_target_properties
(
inference_engine PROPERTIES IMPORTED_LINK_INTERFACE_LIBRARIES
"
${
omp_lib
}
"
)
else
()
set_target_properties
(
inference_engine PROPERTIES IMPORTED_LINK_INTERFACE_LIBRARIES
"
${
INF_ENGINE_OMP_LIBRARY
}
"
)
endif
()
endif
()
endif
()
set
(
INF_ENGINE_VERSION
"Unknown"
CACHE STRING
""
)
set
(
INF_ENGINE_VERSION
"Unknown"
CACHE STRING
""
)
set
(
INF_ENGINE_TARGET inference_engine PARENT_SCOPE
)
set
(
INF_ENGINE_TARGET inference_engine PARENT_SCOPE
)
...
@@ -64,9 +65,17 @@ if(NOT INF_ENGINE_TARGET AND INF_ENGINE_LIB_DIRS AND INF_ENGINE_INCLUDE_DIRS)
...
@@ -64,9 +65,17 @@ if(NOT INF_ENGINE_TARGET AND INF_ENGINE_LIB_DIRS AND INF_ENGINE_INCLUDE_DIRS)
add_custom_ie_build
(
"
${
ie_custom_inc
}
"
"
${
ie_custom_lib
}
"
"
${
ie_custom_lib_rel
}
"
"
${
ie_custom_lib_dbg
}
"
"INF_ENGINE_{INCLUDE,LIB}_DIRS"
)
add_custom_ie_build
(
"
${
ie_custom_inc
}
"
"
${
ie_custom_lib
}
"
"
${
ie_custom_lib_rel
}
"
"
${
ie_custom_lib_dbg
}
"
"INF_ENGINE_{INCLUDE,LIB}_DIRS"
)
endif
()
endif
()
set
(
_loc
"$ENV{INTEL_CVSDK_DIR}"
)
set
(
_loc
"$ENV{INTEL_OPENVINO_DIR}"
)
if
(
NOT _loc AND DEFINED ENV{INTEL_CVSDK_DIR}
)
set
(
_loc
"$ENV{INTEL_CVSDK_DIR}"
)
# OpenVINO 2018.x
endif
()
if
(
NOT INF_ENGINE_TARGET AND _loc
)
if
(
NOT INF_ENGINE_TARGET AND _loc
)
set
(
INF_ENGINE_PLATFORM
"ubuntu_16.04"
CACHE STRING
"InferenceEngine platform (library dir)"
)
if
(
NOT INF_ENGINE_RELEASE VERSION_GREATER
"2018050000"
)
set
(
INF_ENGINE_PLATFORM_DEFAULT
"ubuntu_16.04"
)
else
()
set
(
INF_ENGINE_PLATFORM_DEFAULT
""
)
endif
()
set
(
INF_ENGINE_PLATFORM
"
${
INF_ENGINE_PLATFORM_DEFAULT
}
"
CACHE STRING
"InferenceEngine platform (library dir)"
)
find_path
(
ie_custom_env_inc
"inference_engine.hpp"
PATHS
"
${
_loc
}
/deployment_tools/inference_engine/include"
NO_DEFAULT_PATH
)
find_path
(
ie_custom_env_inc
"inference_engine.hpp"
PATHS
"
${
_loc
}
/deployment_tools/inference_engine/include"
NO_DEFAULT_PATH
)
find_library
(
ie_custom_env_lib
"inference_engine"
PATHS
"
${
_loc
}
/deployment_tools/inference_engine/lib/
${
INF_ENGINE_PLATFORM
}
/intel64"
NO_DEFAULT_PATH
)
find_library
(
ie_custom_env_lib
"inference_engine"
PATHS
"
${
_loc
}
/deployment_tools/inference_engine/lib/
${
INF_ENGINE_PLATFORM
}
/intel64"
NO_DEFAULT_PATH
)
find_library
(
ie_custom_env_lib_rel
"inference_engine"
PATHS
"
${
_loc
}
/deployment_tools/inference_engine/lib/intel64/Release"
NO_DEFAULT_PATH
)
find_library
(
ie_custom_env_lib_rel
"inference_engine"
PATHS
"
${
_loc
}
/deployment_tools/inference_engine/lib/intel64/Release"
NO_DEFAULT_PATH
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录