Skip to content

Commit 6c345be

Browse files
committed
Add OpenCV-4.1.0
1 parent b0bb6cb commit 6c345be

File tree

344 files changed

+471792
-879
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

344 files changed

+471792
-879
lines changed

LICENSE

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
By downloading, copying, installing or using the software you agree to this license.
2+
If you do not agree to this license, do not download, install,
3+
copy or use the software.
4+
5+
6+
License Agreement
7+
For Open Source Computer Vision Library
8+
(3-clause BSD License)
9+
10+
Copyright (C) 2000-2019, Intel Corporation, all rights reserved.
11+
Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.
12+
Copyright (C) 2009-2016, NVIDIA Corporation, all rights reserved.
13+
Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved.
14+
Copyright (C) 2015-2016, OpenCV Foundation, all rights reserved.
15+
Copyright (C) 2015-2016, Itseez Inc., all rights reserved.
16+
Third party copyrights are property of their respective owners.
17+
18+
Redistribution and use in source and binary forms, with or without modification,
19+
are permitted provided that the following conditions are met:
20+
21+
* Redistributions of source code must retain the above copyright notice,
22+
this list of conditions and the following disclaimer.
23+
24+
* Redistributions in binary form must reproduce the above copyright notice,
25+
this list of conditions and the following disclaimer in the documentation
26+
and/or other materials provided with the distribution.
27+
28+
* Neither the names of the copyright holders nor the names of the contributors
29+
may be used to endorse or promote products derived from this software
30+
without specific prior written permission.
31+
32+
This software is provided by the copyright holders and contributors "as is" and
33+
any express or implied warranties, including, but not limited to, the implied
34+
warranties of merchantability and fitness for a particular purpose are disclaimed.
35+
In no event shall copyright holders or contributors be liable for any direct,
36+
indirect, incidental, special, exemplary, or consequential damages
37+
(including, but not limited to, procurement of substitute goods or services;
38+
loss of use, data, or profits; or business interruption) however caused
39+
and on any theory of liability, whether in contract, strict liability,
40+
or tort (including negligence or otherwise) arising in any way out of
41+
the use of this software, even if advised of the possibility of such damage.

OpenCVConfig-version.cmake

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
set(OpenCV_VERSION 4.1.0)
2+
set(PACKAGE_VERSION ${OpenCV_VERSION})
3+
4+
set(PACKAGE_VERSION_EXACT False)
5+
set(PACKAGE_VERSION_COMPATIBLE False)
6+
7+
if(PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION)
8+
set(PACKAGE_VERSION_EXACT True)
9+
set(PACKAGE_VERSION_COMPATIBLE True)
10+
endif()
11+
12+
if(PACKAGE_FIND_VERSION_MAJOR EQUAL 4
13+
AND PACKAGE_FIND_VERSION VERSION_LESS PACKAGE_VERSION)
14+
set(PACKAGE_VERSION_COMPATIBLE True)
15+
endif()

OpenCVConfig.cmake

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
# ===================================================================================
2+
# The OpenCV CMake configuration file
3+
#
4+
# ** File generated automatically, do not modify **
5+
#
6+
# Usage from an external project:
7+
# In your CMakeLists.txt, add these lines:
8+
#
9+
# FIND_PACKAGE(OpenCV REQUIRED)
10+
# TARGET_LINK_LIBRARIES(MY_TARGET_NAME ${OpenCV_LIBS})
11+
#
12+
# Or you can search for specific OpenCV modules:
13+
#
14+
# FIND_PACKAGE(OpenCV REQUIRED core imgcodecs)
15+
#
16+
# If the module is found then OPENCV_<MODULE>_FOUND is set to TRUE.
17+
#
18+
# This file will define the following variables:
19+
# - OpenCV_LIBS : The list of libraries to link against.
20+
# - OpenCV_INCLUDE_DIRS : The OpenCV include directories.
21+
# - OpenCV_COMPUTE_CAPABILITIES : The version of compute capability
22+
# - OpenCV_VERSION : The version of this OpenCV build: "4.1.0"
23+
# - OpenCV_VERSION_MAJOR : Major version part of OpenCV_VERSION: "4"
24+
# - OpenCV_VERSION_MINOR : Minor version part of OpenCV_VERSION: "1"
25+
# - OpenCV_VERSION_PATCH : Patch version part of OpenCV_VERSION: "0"
26+
# - OpenCV_VERSION_STATUS : Development status of this build: ""
27+
#
28+
# Advanced variables:
29+
# - OpenCV_SHARED
30+
#
31+
# ===================================================================================
32+
#
33+
# Windows pack specific options:
34+
# - OpenCV_STATIC
35+
# - OpenCV_CUDA
36+
37+
if(CMAKE_VERSION VERSION_GREATER 2.6)
38+
get_property(OpenCV_LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
39+
if(NOT ";${OpenCV_LANGUAGES};" MATCHES ";CXX;")
40+
enable_language(CXX)
41+
endif()
42+
endif()
43+
44+
if(NOT DEFINED OpenCV_STATIC)
45+
# look for global setting
46+
if(NOT DEFINED BUILD_SHARED_LIBS OR BUILD_SHARED_LIBS)
47+
set(OpenCV_STATIC OFF)
48+
else()
49+
set(OpenCV_STATIC ON)
50+
endif()
51+
endif()
52+
53+
if(NOT DEFINED OpenCV_CUDA)
54+
# if user' app uses CUDA, then it probably wants CUDA-enabled OpenCV binaries
55+
if(CUDA_FOUND)
56+
set(OpenCV_CUDA ON)
57+
endif()
58+
endif()
59+
60+
function(check_one_config RES)
61+
set(${RES} "" PARENT_SCOPE)
62+
if(NOT OpenCV_RUNTIME OR NOT OpenCV_ARCH)
63+
return()
64+
endif()
65+
set(candidates)
66+
if(OpenCV_STATIC)
67+
list(APPEND candidates "${OpenCV_ARCH}/${OpenCV_RUNTIME}/staticlib")
68+
endif()
69+
if(OpenCV_CUDA)
70+
list(APPEND candidates "gpu/${OpenCV_ARCH}/${OpenCV_RUNTIME}/lib")
71+
endif()
72+
if(OpenCV_CUDA AND OpenCV_STATIC)
73+
list(APPEND candidates "gpu/${OpenCV_ARCH}/${OpenCV_RUNTIME}/staticlib")
74+
endif()
75+
list(APPEND candidates "${OpenCV_ARCH}/${OpenCV_RUNTIME}/lib")
76+
foreach(c ${candidates})
77+
set(p "${OpenCV_CONFIG_PATH}/${c}")
78+
if(EXISTS "${p}/OpenCVConfig.cmake")
79+
set(${RES} "${p}" PARENT_SCOPE)
80+
return()
81+
endif()
82+
endforeach()
83+
endfunction()
84+
85+
get_filename_component(OpenCV_CONFIG_PATH "${CMAKE_CURRENT_LIST_FILE}" DIRECTORY)
86+
87+
if(DEFINED OpenCV_ARCH AND DEFINED OpenCV_RUNTIME)
88+
# custom overridden values
89+
elseif(MSVC)
90+
if(CMAKE_CL_64)
91+
set(OpenCV_ARCH x64)
92+
elseif((CMAKE_GENERATOR MATCHES "ARM") OR ("${arch_hint}" STREQUAL "ARM") OR (CMAKE_VS_EFFECTIVE_PLATFORMS MATCHES "ARM|arm"))
93+
# see Modules/CmakeGenericSystem.cmake
94+
set(OpenCV_ARCH ARM)
95+
else()
96+
set(OpenCV_ARCH x86)
97+
endif()
98+
if(MSVC_VERSION EQUAL 1400)
99+
set(OpenCV_RUNTIME vc8)
100+
elseif(MSVC_VERSION EQUAL 1500)
101+
set(OpenCV_RUNTIME vc9)
102+
elseif(MSVC_VERSION EQUAL 1600)
103+
set(OpenCV_RUNTIME vc10)
104+
elseif(MSVC_VERSION EQUAL 1700)
105+
set(OpenCV_RUNTIME vc11)
106+
elseif(MSVC_VERSION EQUAL 1800)
107+
set(OpenCV_RUNTIME vc12)
108+
elseif(MSVC_VERSION EQUAL 1900)
109+
set(OpenCV_RUNTIME vc14)
110+
elseif(MSVC_VERSION MATCHES "^191[0-9]$")
111+
set(OpenCV_RUNTIME vc15)
112+
check_one_config(has_VS2017)
113+
if(NOT has_VS2017)
114+
set(OpenCV_RUNTIME vc14) # selecting previous compatible runtime version
115+
endif()
116+
elseif(MSVC_VERSION MATCHES "^192[0-9]$")
117+
set(OpenCV_RUNTIME vc16)
118+
check_one_config(has_VS2019)
119+
if(NOT has_VS2019)
120+
set(OpenCV_RUNTIME vc15) # selecting previous compatible runtime version
121+
check_one_config(has_VS2017)
122+
if(NOT has_VS2017)
123+
set(OpenCV_RUNTIME vc14) # selecting previous compatible runtime version
124+
endif()
125+
endif()
126+
endif()
127+
elseif(MINGW)
128+
set(OpenCV_RUNTIME mingw)
129+
130+
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpmachine
131+
OUTPUT_VARIABLE OPENCV_GCC_TARGET_MACHINE
132+
OUTPUT_STRIP_TRAILING_WHITESPACE)
133+
if(OPENCV_GCC_TARGET_MACHINE MATCHES "amd64|x86_64|AMD64")
134+
set(MINGW64 1)
135+
set(OpenCV_ARCH x64)
136+
else()
137+
set(OpenCV_ARCH x86)
138+
endif()
139+
endif()
140+
141+
check_one_config(OpenCV_LIB_PATH)
142+
143+
if(NOT OpenCV_FIND_QUIETLY)
144+
message(STATUS "OpenCV ARCH: ${OpenCV_ARCH}")
145+
message(STATUS "OpenCV RUNTIME: ${OpenCV_RUNTIME}")
146+
message(STATUS "OpenCV STATIC: ${OpenCV_STATIC}")
147+
endif()
148+
149+
if(OpenCV_LIB_PATH AND EXISTS "${OpenCV_LIB_PATH}/OpenCVConfig.cmake")
150+
include("${OpenCV_LIB_PATH}/OpenCVConfig.cmake")
151+
152+
if(NOT OpenCV_FIND_QUIETLY)
153+
message(STATUS "Found OpenCV ${OpenCV_VERSION} in ${OpenCV_LIB_PATH}")
154+
if(NOT OpenCV_LIB_PATH MATCHES "/staticlib")
155+
get_filename_component(_OpenCV_LIB_PATH "${OpenCV_LIB_PATH}/../bin" ABSOLUTE)
156+
file(TO_NATIVE_PATH "${_OpenCV_LIB_PATH}" _OpenCV_LIB_PATH)
157+
message(STATUS "You might need to add ${_OpenCV_LIB_PATH} to your PATH to be able to run your applications.")
158+
if(OpenCV_LIB_PATH MATCHES "/gpu/")
159+
string(REPLACE "\\gpu" "" _OpenCV_LIB_PATH2 "${_OpenCV_LIB_PATH}")
160+
message(STATUS "GPU support is enabled so you might also need ${_OpenCV_LIB_PATH2} in your PATH (it must go after the ${_OpenCV_LIB_PATH}).")
161+
endif()
162+
endif()
163+
endif()
164+
else()
165+
if(NOT OpenCV_FIND_QUIETLY)
166+
message(WARNING
167+
"Found OpenCV Windows Pack but it has no binaries compatible with your configuration.
168+
You should manually point CMake variable OpenCV_DIR to your build of OpenCV library."
169+
)
170+
endif()
171+
set(OpenCV_FOUND FALSE)
172+
endif()

0 commit comments

Comments
 (0)