Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
0eb2be76
O
Opencv
项目概览
Greenplum
/
Opencv
大约 1 年 前同步成功
通知
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,发现更多精彩内容 >>
提交
0eb2be76
编写于
12月 05, 2013
作者:
A
Alexander Alekhin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cmake: allow source_group to preserve file-system tree (for MSVS)
上级
d368bf52
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
60 addition
and
14 deletion
+60
-14
cmake/OpenCVModule.cmake
cmake/OpenCVModule.cmake
+10
-11
cmake/OpenCVUtils.cmake
cmake/OpenCVUtils.cmake
+50
-3
未找到文件。
cmake/OpenCVModule.cmake
浏览文件 @
0eb2be76
...
...
@@ -485,6 +485,9 @@ macro(ocv_glob_module_sources)
file
(
GLOB lib_hdrs
"include/opencv2/*.hpp"
"include/opencv2/
${
name
}
/*.hpp"
"include/opencv2/
${
name
}
/*.h"
)
file
(
GLOB lib_hdrs_detail
"include/opencv2/
${
name
}
/detail/*.hpp"
"include/opencv2/
${
name
}
/detail/*.h"
)
ocv_source_group
(
"Src"
DIRBASE
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/src"
FILES
${
lib_srcs
}
${
lib_int_hdrs
}
)
ocv_source_group
(
"Include"
DIRBASE
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/include"
FILES
${
lib_hdrs
}
${
lib_hdrs_detail
}
)
file
(
GLOB lib_cuda_srcs
"src/cuda/*.cu"
)
set
(
cuda_objs
""
)
set
(
lib_cuda_hdrs
""
)
...
...
@@ -493,11 +496,9 @@ macro(ocv_glob_module_sources)
file
(
GLOB lib_cuda_hdrs
"src/cuda/*.hpp"
)
ocv_cuda_compile
(
cuda_objs
${
lib_cuda_srcs
}
${
lib_cuda_hdrs
}
)
source_group
(
"Src
\\
Cuda"
FILES
${
lib_cuda_srcs
}
${
lib_cuda_hdrs
}
)
source_group
(
"Src
\\
Cuda"
FILES
${
lib_cuda_srcs
}
${
lib_cuda_hdrs
}
)
endif
()
source_group
(
"Src"
FILES
${
lib_srcs
}
${
lib_int_hdrs
}
)
file
(
GLOB cl_kernels
"src/opencl/*.cl"
)
if
(
cl_kernels
)
ocv_include_directories
(
${
OPENCL_INCLUDE_DIRS
}
)
...
...
@@ -506,15 +507,13 @@ macro(ocv_glob_module_sources)
OUTPUT
"
${
CMAKE_CURRENT_BINARY_DIR
}
/opencl_kernels.cpp"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/opencl_kernels.hpp"
COMMAND
${
CMAKE_COMMAND
}
-DMODULE_NAME=
"
${
the_module_barename
}
"
-DCL_DIR=
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/src/opencl"
-DOUTPUT=
"
${
CMAKE_CURRENT_BINARY_DIR
}
/opencl_kernels.cpp"
-P
"
${
OpenCV_SOURCE_DIR
}
/cmake/cl2cpp.cmake"
DEPENDS
${
cl_kernels
}
"
${
OpenCV_SOURCE_DIR
}
/cmake/cl2cpp.cmake"
)
source_group
(
"OpenCL"
FILES
${
cl_kernels
}
"
${
CMAKE_CURRENT_BINARY_DIR
}
/opencl_kernels.cpp"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/opencl_kernels.hpp"
)
ocv_source_group
(
"Src
\\
opencl
\\
kernels"
FILES
${
cl_kernels
}
)
ocv_source_group
(
"Src
\\
opencl
\\
kernels
\\
autogenerated"
FILES
"
${
CMAKE_CURRENT_BINARY_DIR
}
/opencl_kernels.cpp"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/opencl_kernels.hpp"
)
list
(
APPEND lib_srcs
${
cl_kernels
}
"
${
CMAKE_CURRENT_BINARY_DIR
}
/opencl_kernels.cpp"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/opencl_kernels.hpp"
)
endif
()
ocv_set_module_sources
(
${
ARGN
}
HEADERS
${
lib_hdrs
}
${
lib_hdrs_detail
}
SOURCES
${
lib_srcs
}
${
lib_int_hdrs
}
${
cuda_objs
}
${
lib_cuda_srcs
}
${
lib_cuda_hdrs
}
)
source_group
(
"Include"
FILES
${
lib_hdrs
}
)
source_group
(
"Include
\\
detail"
FILES
${
lib_hdrs_detail
}
)
endmacro
()
# creates OpenCV module in current folder
...
...
@@ -692,8 +691,8 @@ function(ocv_add_perf_tests)
if
(
NOT OPENCV_PERF_
${
the_module
}
_SOURCES
)
file
(
GLOB_RECURSE perf_srcs
"
${
perf_path
}
/*.cpp"
)
file
(
GLOB_RECURSE perf_hdrs
"
${
perf_path
}
/*.hpp"
"
${
perf_path
}
/*.h"
)
source_group
(
"Src
"
FILES
${
perf_srcs
}
)
source_group
(
"Include
"
FILES
${
perf_hdrs
}
)
ocv_source_group
(
"Src"
DIRBASE
"
${
perf_path
}
"
FILES
${
perf_srcs
}
)
ocv_source_group
(
"Include"
DIRBASE
"
${
perf_path
}
"
FILES
${
perf_hdrs
}
)
set
(
OPENCV_PERF_
${
the_module
}
_SOURCES
${
perf_srcs
}
${
perf_hdrs
}
)
endif
()
...
...
@@ -742,8 +741,8 @@ function(ocv_add_accuracy_tests)
if
(
NOT OPENCV_TEST_
${
the_module
}
_SOURCES
)
file
(
GLOB_RECURSE test_srcs
"
${
test_path
}
/*.cpp"
)
file
(
GLOB_RECURSE test_hdrs
"
${
test_path
}
/*.hpp"
"
${
test_path
}
/*.h"
)
source_group
(
"Src
"
FILES
${
test_srcs
}
)
source_group
(
"Include
"
FILES
${
test_hdrs
}
)
ocv_source_group
(
"Src"
DIRBASE
"
${
test_path
}
"
FILES
${
test_srcs
}
)
ocv_source_group
(
"Include"
DIRBASE
"
${
test_path
}
"
FILES
${
test_hdrs
}
)
set
(
OPENCV_TEST_
${
the_module
}
_SOURCES
${
test_srcs
}
${
test_hdrs
}
)
endif
()
...
...
cmake/OpenCVUtils.cmake
浏览文件 @
0eb2be76
# Debugging function
function
(
ocv_cmake_dump_vars
)
cmake_parse_arguments
(
DUMP
""
"TOFILE"
""
${
ARGN
}
)
set
(
regex
"
${
DUMP_UNPARSED_ARGUMENTS
}
"
)
get_cmake_property
(
_variableNames VARIABLES
)
set
(
VARS
""
)
foreach
(
_variableName
${
_variableNames
}
)
if
(
_variableName MATCHES
"
${
regex
}
"
)
set
(
VARS
"
${
VARS
}${
_variableName
}
=
${${
_variableName
}}
\n
"
)
endif
()
endforeach
()
if
(
DUMP_TOFILE
)
file
(
WRITE
${
CMAKE_BINARY_DIR
}
/
${
DUMP_TOFILE
}
"
${
VARS
}
"
)
else
()
message
(
AUTHOR_WARNING
"
${
VARS
}
"
)
endif
()
endfunction
()
# Search packages for host system instead of packages for target system
# in case of cross compilation thess macro should be defined by toolchain file
if
(
NOT COMMAND find_host_package
)
...
...
@@ -601,7 +620,35 @@ endmacro()
################################################################################################
# short command to setup source group
function
(
ocv_source_group group
)
cmake_parse_arguments
(
OCV_SOURCE_GROUP
""
""
"GLOB"
${
ARGN
}
)
file
(
GLOB srcs
${
OCV_SOURCE_GROUP_GLOB
}
)
source_group
(
${
group
}
FILES
${
srcs
}
)
cmake_parse_arguments
(
SG
""
"DIRBASE"
"GLOB;GLOB_RECURSE;FILES"
${
ARGN
}
)
set
(
files
""
)
if
(
SG_FILES
)
list
(
APPEND files
${
SG_FILES
}
)
endif
()
if
(
SG_GLOB
)
file
(
GLOB srcs
${
SG_GLOB
}
)
list
(
APPEND files
${
srcs
}
)
endif
()
if
(
SG_GLOB_RECURSE
)
file
(
GLOB_RECURSE srcs
${
SG_GLOB_RECURSE
}
)
list
(
APPEND files
${
srcs
}
)
endif
()
if
(
SG_DIRBASE
)
foreach
(
f
${
files
}
)
file
(
RELATIVE_PATH fpart
"
${
SG_DIRBASE
}
"
"
${
f
}
"
)
if
(
fpart MATCHES
"^
\\
.
\\
."
)
message
(
AUTHOR_WARNING
"Can't detect subpath for source_group command: Group=
${
group
}
FILE=
${
f
}
DIRBASE=
${
SG_DIRBASE
}
"
)
set
(
fpart
""
)
else
()
get_filename_component
(
fpart
"
${
fpart
}
"
PATH
)
if
(
fpart
)
set
(
fpart
"/
${
fpart
}
"
)
# add '/'
string
(
REPLACE
"/"
"
\\
"
fpart
"
${
fpart
}
"
)
endif
()
endif
()
source_group
(
"
${
group
}${
fpart
}
"
FILES
${
f
}
)
endforeach
()
else
()
source_group
(
${
group
}
FILES
${
files
}
)
endif
()
endfunction
()
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录