Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
c86c6a02
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,发现更多精彩内容 >>
提交
c86c6a02
编写于
1月 25, 2012
作者:
A
Andrey Kamaev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updating opencv module definition in cmake (continued)
上级
18ce0dff
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
41 addition
and
129 deletion
+41
-129
cmake/OpenCVModule.cmake
cmake/OpenCVModule.cmake
+40
-1
modules/core/CMakeLists.txt
modules/core/CMakeLists.txt
+1
-128
未找到文件。
cmake/OpenCVModule.cmake
浏览文件 @
c86c6a02
...
...
@@ -213,9 +213,48 @@ macro(define_opencv_moduleEx _name _visibility)
list
(
APPEND lib_hdrs
${
lib_hdrs_detail
}
)
add_library
(
${
the_target
}
${
OPENCV_
${
mname
}
_MODULE_TYPE
}
${
lib_srcs
}
${
lib_hdrs
}
${
lib_int_hdrs
}
)
if
(
HAVE_CUDA AND EXISTS
"src/cuda/"
)
file
(
GLOB lib_cuda
"src/cuda/*.cu"
)
source_group
(
"Cuda"
FILES
"
${
lib_cuda
}
"
)
include_directories
(
${
CUDA_INCLUDE_DIRS
}
)
include_directories
(
"
${
OpenCV_SOURCE_DIR
}
/modules/gpu/src"
)
include_directories
(
"
${
OpenCV_SOURCE_DIR
}
/modules/gpu/src/cuda"
)
set
(
CUDA_NVCC_FLAGS
${
CUDA_NVCC_FLAGS
}
-gencode arch=compute_10,code=sm_10
-gencode arch=compute_11,code=sm_11
-gencode arch=compute_12,code=sm_12
-gencode arch=compute_13,code=sm_13
-gencode arch=compute_20,code=sm_20
-gencode arch=compute_20,code=sm_21
)
if
(
UNIX OR APPLE
)
set
(
CUDA_NVCC_FLAGS
${
CUDA_NVCC_FLAGS
}
-Xcompiler -fPIC
)
endif
()
if
(
APPLE
)
set
(
CUDA_NVCC_FLAGS
${
CUDA_NVCC_FLAGS
}
-Xcompiler -fno-finite-math-only
)
endif
()
#set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-keep")
#set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-Xcompiler;/EHsc-;")
CUDA_COMPILE
(
cuda_objs
${
lib_cuda
}
)
else
()
set
(
lib_cuda
""
)
set
(
cuda_objs
""
)
endif
()
add_library
(
${
the_target
}
${
OPENCV_
${
mname
}
_MODULE_TYPE
}
${
lib_srcs
}
${
lib_hdrs
}
${
lib_int_hdrs
}
${
lib_cuda
}
${
cuda_objs
}
)
target_link_libraries
(
${
the_target
}
${
OPENCV_LINKER_LIBS
}
${
IPP_LIBS
}
${
ARGN
}
)
if
(
HAVE_CUDA AND EXISTS
"src/cuda/"
)
target_link_libraries
(
${
the_target
}
${
CUDA_LIBRARIES
}
)
unset
(
CUDA_npp_LIBRARY CACHE
)
find_cuda_helper_libs
(
npp
)
target_link_libraries
(
${
the_target
}
${
CUDA_npp_LIBRARY
}
)
endif
()
if
(
visibility STREQUAL
"public"
)
opencv_module_register
(
${
the_target
}
)
endif
()
...
...
modules/core/CMakeLists.txt
浏览文件 @
c86c6a02
...
...
@@ -4,131 +4,4 @@ else()
include_directories
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/../../3rdparty/zlib"
)
endif
()
#define_opencv_module(core ${ZLIB_LIBRARY})
set
(
name
"core"
)
project
(
opencv_
${
name
}
)
include_directories
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/include"
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/src"
"
${
CMAKE_CURRENT_BINARY_DIR
}
"
)
file
(
GLOB lib_srcs
"src/*.cpp"
)
file
(
GLOB lib_int_hdrs
"src/*.h*"
)
file
(
GLOB lib_hdrs
"include/opencv2/
${
name
}
/*.h*"
)
file
(
GLOB lib_hdrs_detail
"include/opencv2/
${
name
}
/detail/*.h*"
)
if
(
COMMAND get_module_external_sources
)
get_module_external_sources
(
${
name
}
)
endif
()
source_group
(
"Src"
FILES
${
lib_srcs
}
${
lib_int_hdrs
}
)
source_group
(
"Include"
FILES
${
lib_hdrs
}
)
source_group
(
"Include
\\
detail"
FILES
${
lib_hdrs_detail
}
)
list
(
APPEND lib_hdrs
${
lib_hdrs_detail
}
)
if
(
HAVE_CUDA
)
file
(
GLOB lib_cuda
"src/cuda/*.cu"
)
source_group
(
"Cuda"
FILES
"
${
lib_cuda
}
"
)
include_directories
(
${
CUDA_INCLUDE_DIRS
}
)
include_directories
(
"
${
OpenCV_SOURCE_DIR
}
/modules/gpu/src"
)
include_directories
(
"
${
OpenCV_SOURCE_DIR
}
/modules/gpu/src/cuda"
)
set
(
CUDA_NVCC_FLAGS
${
CUDA_NVCC_FLAGS
}
-gencode arch=compute_10,code=sm_10
-gencode arch=compute_11,code=sm_11
-gencode arch=compute_12,code=sm_12
-gencode arch=compute_13,code=sm_13
-gencode arch=compute_20,code=sm_20
-gencode arch=compute_20,code=sm_21
)
if
(
UNIX OR APPLE
)
set
(
CUDA_NVCC_FLAGS
${
CUDA_NVCC_FLAGS
}
"-Xcompiler;-fPIC;"
)
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" "-fPIC")
endif
()
#set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-keep")
#set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-Xcompiler;/EHsc-;")
if
(
APPLE
)
set
(
CUDA_NVCC_FLAGS
${
CUDA_NVCC_FLAGS
}
"-Xcompiler;-fno-finite-math-only;"
)
endif
()
CUDA_COMPILE
(
cuda_objs
${
lib_cuda
}
)
#CUDA_BUILD_CLEAN_TARGET()
endif
()
set
(
the_target
"opencv_
${
name
}
"
)
add_library
(
${
the_target
}
${
lib_srcs
}
${
lib_hdrs
}
${
lib_int_hdrs
}
${
lib_cuda
}
${
cuda_objs
}
)
# For dynamic link numbering convenions
if
(
NOT ANDROID
)
# Android SDK build scripts can include only .so files into final .apk
# As result we should not set version properties for Android
set_target_properties
(
${
the_target
}
PROPERTIES
VERSION
${
OPENCV_VERSION
}
SOVERSION
${
OPENCV_SOVERSION
}
)
endif
()
set_target_properties
(
${
the_target
}
PROPERTIES OUTPUT_NAME
"
${
the_target
}${
OPENCV_DLLVERSION
}
"
)
if
(
ENABLE_SOLUTION_FOLDERS
)
set_target_properties
(
${
the_target
}
PROPERTIES FOLDER
"modules"
)
endif
()
if
(
BUILD_SHARED_LIBS
)
if
(
MSVC
)
set_target_properties
(
${
the_target
}
PROPERTIES DEFINE_SYMBOL CVAPI_EXPORTS
)
else
()
add_definitions
(
-DCVAPI_EXPORTS
)
endif
()
endif
()
# Additional target properties
set_target_properties
(
${
the_target
}
PROPERTIES
DEBUG_POSTFIX
"
${
OPENCV_DEBUG_POSTFIX
}
"
ARCHIVE_OUTPUT_DIRECTORY
${
LIBRARY_OUTPUT_PATH
}
RUNTIME_OUTPUT_DIRECTORY
${
EXECUTABLE_OUTPUT_PATH
}
INSTALL_NAME_DIR lib
)
# Add the required libraries for linking:
target_link_libraries
(
${
the_target
}
${
OPENCV_LINKER_LIBS
}
${
IPP_LIBS
}
${
ZLIB_LIBRARY
}
)
if
(
HAVE_CUDA
)
target_link_libraries
(
${
the_target
}
${
CUDA_LIBRARIES
}
)
unset
(
CUDA_npp_LIBRARY CACHE
)
find_cuda_helper_libs
(
npp
)
target_link_libraries
(
${
the_target
}
${
CUDA_npp_LIBRARY
}
)
endif
()
if
(
MSVC
)
if
(
CMAKE_CROSSCOMPILING
)
set_target_properties
(
${
the_target
}
PROPERTIES
LINK_FLAGS
"/NODEFAULTLIB:secchk"
)
endif
()
set_target_properties
(
${
the_target
}
PROPERTIES
LINK_FLAGS
"/NODEFAULTLIB:libc /DEBUG"
)
endif
()
# Dependencies of this target:
add_dependencies
(
${
the_target
}
${
ZLIB_LIBRARY
}
)
install
(
TARGETS
${
the_target
}
RUNTIME DESTINATION bin COMPONENT main
LIBRARY DESTINATION
${
OPENCV_LIB_INSTALL_PATH
}
COMPONENT main
ARCHIVE DESTINATION
${
OPENCV_LIB_INSTALL_PATH
}
COMPONENT main
)
install
(
FILES
${
lib_hdrs
}
DESTINATION
${
OPENCV_INCLUDE_PREFIX
}
/opencv2/
${
name
}
COMPONENT main
)
add_opencv_precompiled_headers
(
${
the_target
}
)
define_opencv_test
(
${
name
}
)
define_opencv_perf_test
(
${
name
}
)
define_opencv_module
(
core
${
ZLIB_LIBRARY
}
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录