Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
5ef548a9
O
Opencv
项目概览
Greenplum
/
Opencv
11 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
5ef548a9
编写于
7月 18, 2019
作者:
A
Alexander Alekhin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cmake: update initialization
上级
32da0705
变更
18
隐藏空白更改
内联
并排
Showing
18 changed file
with
96 addition
and
91 deletion
+96
-91
3rdparty/libjpeg/CMakeLists.txt
3rdparty/libjpeg/CMakeLists.txt
+0
-7
CMakeLists.txt
CMakeLists.txt
+43
-62
cmake/OpenCVCRTLinkage.cmake
cmake/OpenCVCRTLinkage.cmake
+0
-10
cmake/OpenCVCompilerOptions.cmake
cmake/OpenCVCompilerOptions.cmake
+0
-5
cmake/OpenCVMinDepVersions.cmake
cmake/OpenCVMinDepVersions.cmake
+3
-1
cmake/OpenCVModule.cmake
cmake/OpenCVModule.cmake
+0
-4
cmake/OpenCVUtils.cmake
cmake/OpenCVUtils.cmake
+2
-1
cmake/platforms/OpenCV-Android.cmake
cmake/platforms/OpenCV-Android.cmake
+1
-0
cmake/platforms/OpenCV-Darwin.cmake
cmake/platforms/OpenCV-Darwin.cmake
+1
-0
cmake/platforms/OpenCV-Linux.cmake
cmake/platforms/OpenCV-Linux.cmake
+1
-0
cmake/platforms/OpenCV-WinRT.cmake
cmake/platforms/OpenCV-WinRT.cmake
+31
-0
cmake/platforms/OpenCV-Windows.cmake
cmake/platforms/OpenCV-Windows.cmake
+1
-0
cmake/platforms/OpenCV-WindowsCE.cmake
cmake/platforms/OpenCV-WindowsCE.cmake
+1
-0
cmake/platforms/OpenCV-WindowsPhone.cmake
cmake/platforms/OpenCV-WindowsPhone.cmake
+6
-0
cmake/platforms/OpenCV-WindowsStore.cmake
cmake/platforms/OpenCV-WindowsStore.cmake
+1
-0
cmake/platforms/OpenCV-iOS.cmake
cmake/platforms/OpenCV-iOS.cmake
+1
-0
modules/core/CMakeLists.txt
modules/core/CMakeLists.txt
+1
-1
platforms/android/android.toolchain.cmake
platforms/android/android.toolchain.cmake
+3
-0
未找到文件。
3rdparty/libjpeg/CMakeLists.txt
浏览文件 @
5ef548a9
...
...
@@ -15,13 +15,6 @@ else()
ocv_list_filterout
(
lib_srcs jmemnobs.c
)
endif
()
if
(
WINRT
)
add_definitions
(
-DNO_GETENV
)
get_directory_property
(
DirDefs COMPILE_DEFINITIONS
)
message
(
STATUS
"Adding NO_GETENV to compiler definitions for WINRT:"
)
message
(
STATUS
" COMPILE_DEFINITIONS =
${
DirDefs
}
"
)
endif
()
# ----------------------------------------------------------------------------------
# Define the library target:
# ----------------------------------------------------------------------------------
...
...
CMakeLists.txt
浏览文件 @
5ef548a9
...
...
@@ -29,40 +29,19 @@ else()
cmake_minimum_required
(
VERSION
"
${
MIN_VER_CMAKE
}
"
FATAL_ERROR
)
endif
()
option
(
ENABLE_PIC
"Generate position independent code (necessary for shared libraries)"
TRUE
)
set
(
CMAKE_POSITION_INDEPENDENT_CODE
${
ENABLE_PIC
}
)
set
(
OPENCV_MATHJAX_RELPATH
"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0"
CACHE STRING
"URI to a MathJax installation"
)
# Following block can break build in case of cross-compiling
# but CMAKE_CROSSCOMPILING variable will be set only on project(OpenCV) command
# so we will try to detect cross-compiling by the presence of CMAKE_TOOLCHAIN_FILE
if
(
NOT DEFINED CMAKE_INSTALL_PREFIX
)
if
(
NOT CMAKE_TOOLCHAIN_FILE
)
# it _must_ go before project(OpenCV) in order to work
if
(
WIN32
)
set
(
CMAKE_INSTALL_PREFIX
"
${
CMAKE_BINARY_DIR
}
/install"
CACHE PATH
"Installation Directory"
)
else
()
set
(
CMAKE_INSTALL_PREFIX
"/usr/local"
CACHE PATH
"Installation Directory"
)
endif
()
else
()
#Android: set output folder to ${CMAKE_BINARY_DIR}
set
(
LIBRARY_OUTPUT_PATH_ROOT
${
CMAKE_BINARY_DIR
}
CACHE PATH
"root for library output, set this to change where android libs are compiled to"
)
# any cross-compiling
set
(
CMAKE_INSTALL_PREFIX
"
${
CMAKE_BINARY_DIR
}
/install"
CACHE PATH
"Installation Directory"
)
endif
()
endif
()
#
# Configure CMake policies
#
if
(
POLICY CMP0026
)
cmake_policy
(
SET CMP0026 NEW
)
endif
()
if
(
POLICY CMP0042
)
cmake_policy
(
SET CMP0042 NEW
)
cmake_policy
(
SET CMP0042 NEW
)
# CMake 3.0+ (2.8.12): MacOS "@rpath" in target's install name
endif
()
if
(
POLICY CMP0046
)
cmake_policy
(
SET CMP0046 NEW
)
cmake_policy
(
SET CMP0046 NEW
)
# warn about non-existed dependencies
endif
()
if
(
POLICY CMP0051
)
...
...
@@ -74,17 +53,21 @@ if(POLICY CMP0054) # CMake 3.1: Only interpret if() arguments as variables or k
endif
()
if
(
POLICY CMP0056
)
cmake_policy
(
SET CMP0056 NEW
)
cmake_policy
(
SET CMP0056 NEW
)
# try_compile(): link flags
endif
()
if
(
POLICY CMP0067
)
cmake_policy
(
SET CMP0067 NEW
)
cmake_policy
(
SET CMP0067 NEW
)
# CMake 3.8: try_compile(): honor language standard variables (like C++11)
endif
()
if
(
POLICY CMP0068
)
cmake_policy
(
SET CMP0068 NEW
)
# CMake 3.9+: `RPATH` settings on macOS do not affect `install_name`.
endif
()
#
# Configure OpenCV CMake hooks
#
include
(
cmake/OpenCVUtils.cmake
)
ocv_cmake_reset_hooks
()
ocv_check_environment_variables
(
OPENCV_CMAKE_HOOKS_DIR
)
...
...
@@ -97,49 +80,46 @@ endif()
ocv_cmake_hook
(
CMAKE_INIT
)
# must go before the project
command
# must go before the project
()/enable_language() commands
ocv_update
(
CMAKE_CONFIGURATION_TYPES
"Debug;Release"
CACHE STRING
"Configs"
FORCE
)
if
(
DEFINED CMAKE_BUILD_TYPE
)
set_property
(
CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
${
CMAKE_CONFIGURATION_TYPES
}
)
set_property
(
CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"
${
CMAKE_CONFIGURATION_TYPES
}
"
)
endif
()
enable_testing
()
project
(
OpenCV CXX C
)
option
(
ENABLE_PIC
"Generate position independent code (necessary for shared libraries)"
TRUE
)
set
(
CMAKE_POSITION_INDEPENDENT_CODE
${
ENABLE_PIC
}
)
if
(
CMAKE_SYSTEM_NAME MATCHES WindowsPhone OR CMAKE_SYSTEM_NAME MATCHES WindowsStore
)
set
(
WINRT TRUE
)
endif
()
ocv_cmake_hook
(
PRE_CMAKE_BOOTSTRAP
)
if
(
WINRT OR WINCE
)
add_definitions
(
-DNO_GETENV
)
endif
()
# Bootstap CMake system: setup CMAKE_SYSTEM_NAME and other vars
enable_language
(
CXX C
)
if
(
WINRT
)
add_definitions
(
-DWINRT
)
ocv_cmake_hook
(
POST_CMAKE_BOOTSTRAP
)
# Making definitions available to other configurations and
# to filter dependency restrictions at compile time.
if
(
CMAKE_SYSTEM_NAME MATCHES WindowsPhone
)
set
(
WINRT_PHONE TRUE
)
add_definitions
(
-DWINRT_PHONE
)
elseif
(
CMAKE_SYSTEM_NAME MATCHES WindowsStore
)
set
(
WINRT_STORE TRUE
)
add_definitions
(
-DWINRT_STORE
)
if
(
NOT OPENCV_SKIP_CMAKE_SYSTEM_FILE
)
include
(
"cmake/platforms/OpenCV-
${
CMAKE_SYSTEM_NAME
}
.cmake"
OPTIONAL RESULT_VARIABLE
"OPENCV_CMAKE_SYSTEM_FILE"
)
if
(
NOT OPENCV_CMAKE_SYSTEM_FILE
)
message
(
STATUS
"OpenCV: system-specific configuration file is not found: '
${
CMAKE_SYSTEM_NAME
}
'"
)
endif
()
endif
()
if
(
CMAKE_SYSTEM_VERSION MATCHES 10
)
set
(
WINRT_10 TRUE
)
add_definitions
(
-DWINRT_10
)
elseif
(
CMAKE_SYSTEM_VERSION MATCHES 8.1
)
set
(
WINRT_8_1 TRUE
)
add_definitions
(
-DWINRT_8_1
)
elseif
(
CMAKE_SYSTEM_VERSION MATCHES 8.0
)
set
(
WINRT_8_0 TRUE
)
add_definitions
(
-DWINRT_8_0
)
if
(
CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT
)
# https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT.html
if
(
NOT CMAKE_TOOLCHAIN_FILE
)
if
(
WIN32
)
set
(
CMAKE_INSTALL_PREFIX
"
${
CMAKE_BINARY_DIR
}
/install"
CACHE PATH
"Installation Directory"
FORCE
)
else
()
set
(
CMAKE_INSTALL_PREFIX
"/usr/local"
CACHE PATH
"Installation Directory"
FORCE
)
endif
()
else
()
# any cross-compiling
set
(
CMAKE_INSTALL_PREFIX
"
${
CMAKE_BINARY_DIR
}
/install"
CACHE PATH
"Installation Directory"
FORCE
)
endif
()
endif
()
enable_testing
()
project
(
OpenCV CXX C
)
if
(
MSVC
)
set
(
CMAKE_USE_RELATIVE_PATHS ON CACHE INTERNAL
""
FORCE
)
endif
()
...
...
@@ -511,6 +491,7 @@ if(ENABLE_IMPL_COLLECTION)
add_definitions
(
-DCV_COLLECT_IMPL_DATA
)
endif
()
set
(
OPENCV_MATHJAX_RELPATH
"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0"
CACHE STRING
"URI to a MathJax installation"
)
# ----------------------------------------------------------------------------
# Get actual OpenCV version number from sources
...
...
@@ -665,12 +646,12 @@ endif()
if
(
WIN32
)
# Postfix of DLLs:
set
(
OPENCV_DLLVERSION
"
${
OPENCV_VERSION_MAJOR
}${
OPENCV_VERSION_MINOR
}${
OPENCV_VERSION_PATCH
}
"
)
set
(
OPENCV_DEBUG_POSTFIX d
)
ocv_update
(
OPENCV_DLLVERSION
"
${
OPENCV_VERSION_MAJOR
}${
OPENCV_VERSION_MINOR
}${
OPENCV_VERSION_PATCH
}
"
)
ocv_update
(
OPENCV_DEBUG_POSTFIX d
)
else
()
# Postfix of so's:
set
(
OPENCV_DLLVERSION
""
)
set
(
OPENCV_DEBUG_POSTFIX
""
)
ocv_update
(
OPENCV_DLLVERSION
""
)
ocv_update
(
OPENCV_DEBUG_POSTFIX
""
)
endif
()
if
(
DEFINED CMAKE_DEBUG_POSTFIX
)
...
...
cmake/OpenCVCRTLinkage.cmake
浏览文件 @
5ef548a9
...
...
@@ -4,16 +4,6 @@ if(NOT MSVC)
message
(
FATAL_ERROR
"CRT options are available only for MSVC"
)
endif
()
if
(
WINRT
)
if
(
CMAKE_SYSTEM_VERSION MATCHES 10
)
add_definitions
(
/DWINVER=_WIN32_WINNT_WIN10 /DNTDDI_VERSION=NTDDI_WIN10 /D_WIN32_WINNT=_WIN32_WINNT_WIN10
)
elseif
(
CMAKE_SYSTEM_VERSION MATCHES 8.1
)
add_definitions
(
/DWINVER=_WIN32_WINNT_WINBLUE /DNTDDI_VERSION=NTDDI_WINBLUE /D_WIN32_WINNT=_WIN32_WINNT_WINBLUE
)
else
()
add_definitions
(
/DWINVER=_WIN32_WINNT_WIN8 /DNTDDI_VERSION=NTDDI_WIN8 /D_WIN32_WINNT=_WIN32_WINNT_WIN8
)
endif
()
endif
()
# Removing LNK4075 warnings for debug WinRT builds
# "LNK4075: ignoring '/INCREMENTAL' due to '/OPT:ICF' specification"
# "LNK4075: ignoring '/INCREMENTAL' due to '/OPT:REF' specification"
...
...
cmake/OpenCVCompilerOptions.cmake
浏览文件 @
5ef548a9
...
...
@@ -280,11 +280,6 @@ if(MSVC)
endif
()
endif
()
# Adding additional using directory for WindowsPhone 8.0 to get Windows.winmd properly
if
(
WINRT_PHONE AND WINRT_8_0
)
set
(
OPENCV_EXTRA_CXX_FLAGS
"
${
OPENCV_EXTRA_CXX_FLAGS
}
/AI
\$
(WindowsSDK_MetadataPath)"
)
endif
()
include
(
cmake/OpenCVCompilerOptimizations.cmake
)
if
(
COMMAND ocv_compiler_optimization_options
)
ocv_compiler_optimization_options
()
...
...
cmake/OpenCVMinDepVersions.cmake
浏览文件 @
5ef548a9
set
(
MIN_VER_CMAKE 2.8.12.2
)
if
(
NOT DEFINED MIN_VER_CMAKE
)
set
(
MIN_VER_CMAKE 2.8.12.2
)
endif
()
set
(
MIN_VER_CUDA 6.5
)
set
(
MIN_VER_PYTHON2 2.7
)
set
(
MIN_VER_PYTHON3 3.2
)
...
...
cmake/OpenCVModule.cmake
浏览文件 @
5ef548a9
...
...
@@ -1193,10 +1193,6 @@ endfunction()
function
(
ocv_add_accuracy_tests
)
ocv_debug_message
(
"ocv_add_accuracy_tests("
${
ARGN
}
")"
)
if
(
WINRT
)
set
(
OPENCV_DEBUG_POSTFIX
""
)
endif
()
set
(
test_path
"
${
CMAKE_CURRENT_LIST_DIR
}
/test"
)
if
(
BUILD_TESTS AND EXISTS
"
${
test_path
}
"
)
__ocv_parse_test_sources
(
TEST
${
ARGN
}
)
...
...
cmake/OpenCVUtils.cmake
浏览文件 @
5ef548a9
...
...
@@ -16,7 +16,8 @@ function(ocv_cmake_dump_vars)
string
(
TOLOWER
"
${
__variableName
}
"
__variableName_lower
)
if
((
__variableName MATCHES
"
${
regex
}
"
OR __variableName_lower MATCHES
"
${
regex_lower
}
"
)
AND NOT __variableName_lower MATCHES
"^__"
)
set
(
__VARS
"
${
__VARS
}${
__variableName
}
=
${${
__variableName
}}
\n
"
)
get_property
(
__value VARIABLE PROPERTY
"
${
__variableName
}
"
)
set
(
__VARS
"
${
__VARS
}${
__variableName
}
=
${
__value
}
\n
"
)
endif
()
endforeach
()
if
(
DUMP_TOFILE
)
...
...
cmake/platforms/OpenCV-Android.cmake
0 → 100644
浏览文件 @
5ef548a9
# empty
cmake/platforms/OpenCV-Darwin.cmake
0 → 100644
浏览文件 @
5ef548a9
# empty
cmake/platforms/OpenCV-Linux.cmake
0 → 100644
浏览文件 @
5ef548a9
# empty
cmake/platforms/OpenCV-WinRT.cmake
0 → 100644
浏览文件 @
5ef548a9
set
(
WINRT TRUE
)
add_definitions
(
-DWINRT -DNO_GETENV
)
# Making definitions available to other configurations and
# to filter dependency restrictions at compile time.
if
(
WINDOWS_PHONE
)
set
(
WINRT_PHONE TRUE
)
add_definitions
(
-DWINRT_PHONE
)
elseif
(
WINDOWS_STORE
)
set
(
WINRT_STORE TRUE
)
add_definitions
(
-DWINRT_STORE
)
endif
()
if
(
CMAKE_SYSTEM_VERSION MATCHES 10
)
set
(
WINRT_10 TRUE
)
add_definitions
(
-DWINRT_10
)
add_definitions
(
/DWINVER=_WIN32_WINNT_WIN10 /DNTDDI_VERSION=NTDDI_WIN10 /D_WIN32_WINNT=_WIN32_WINNT_WIN10
)
elseif
(
CMAKE_SYSTEM_VERSION MATCHES 8.1
)
set
(
WINRT_8_1 TRUE
)
add_definitions
(
-DWINRT_8_1
)
add_definitions
(
/DWINVER=_WIN32_WINNT_WINBLUE /DNTDDI_VERSION=NTDDI_WINBLUE /D_WIN32_WINNT=_WIN32_WINNT_WINBLUE
)
elseif
(
CMAKE_SYSTEM_VERSION MATCHES 8.0
)
set
(
WINRT_8_0 TRUE
)
add_definitions
(
-DWINRT_8_0
)
add_definitions
(
/DWINVER=_WIN32_WINNT_WIN8 /DNTDDI_VERSION=NTDDI_WIN8 /D_WIN32_WINNT=_WIN32_WINNT_WIN8
)
else
()
message
(
STATUS
"Unsupported WINRT version (consider upgrading OpenCV):
${
CMAKE_SYSTEM_VERSION
}
"
)
endif
()
set
(
OPENCV_DEBUG_POSTFIX
""
)
cmake/platforms/OpenCV-Windows.cmake
0 → 100644
浏览文件 @
5ef548a9
# empty
cmake/platforms/OpenCV-WindowsCE.cmake
0 → 100644
浏览文件 @
5ef548a9
add_definitions
(
-DNO_GETENV
)
cmake/platforms/OpenCV-WindowsPhone.cmake
0 → 100644
浏览文件 @
5ef548a9
include
(
"
${
CMAKE_CURRENT_LIST_DIR
}
/OpenCV_WinRT.cmake"
)
# Adding additional using directory for WindowsPhone 8.0 to get Windows.winmd properly
if
(
WINRT_8_0
)
set
(
OPENCV_EXTRA_CXX_FLAGS
"
${
OPENCV_EXTRA_CXX_FLAGS
}
/AI
\$
(WindowsSDK_MetadataPath)"
)
endif
()
cmake/platforms/OpenCV-WindowsStore.cmake
0 → 100644
浏览文件 @
5ef548a9
include
(
"
${
CMAKE_CURRENT_LIST_DIR
}
/OpenCV_WinRT.cmake"
)
cmake/platforms/OpenCV-iOS.cmake
0 → 100644
浏览文件 @
5ef548a9
# empty
modules/core/CMakeLists.txt
浏览文件 @
5ef548a9
...
...
@@ -23,7 +23,7 @@ ocv_add_module(core
set
(
extra_libs
""
)
if
(
WINRT AND
CMAKE_SYSTEM_NAME MATCHES WindowsStore
AND CMAKE_SYSTEM_VERSION MATCHES
"8.0"
)
if
(
WINRT AND
WINDOWS_STORE
AND CMAKE_SYSTEM_VERSION MATCHES
"8.0"
)
list
(
APPEND extra_libs ole32.lib
)
endif
()
...
...
platforms/android/android.toolchain.cmake
浏览文件 @
5ef548a9
...
...
@@ -1554,6 +1554,9 @@ if( ANDROID_EXPLICIT_CRT_LINK )
endif
()
# setup output directories
if
(
NOT DEFINED CMAKE_INSTALL_PREFIX
)
set
(
CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT 1
)
endif
()
set
(
CMAKE_INSTALL_PREFIX
"
${
ANDROID_TOOLCHAIN_ROOT
}
/user"
CACHE STRING
"path for installing"
)
if
(
DEFINED LIBRARY_OUTPUT_PATH_ROOT
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录