# ----------------------------------------------------------------------------
# Root CMake file for OpenCV
#
# From the off-tree build directory, invoke:
# $ cmake <PATH_TO_OPENCV_ROOT>
#
# ----------------------------------------------------------------------------
# Disable in-source builds to prevent source tree corruption.
if(" ${CMAKE_SOURCE_DIR}" STREQUAL " ${CMAKE_BINARY_DIR}")
message(FATAL_ERROR "
FATAL: In-source builds are not allowed.
You should create a separate directory for build files.
")
endif()
include(cmake/OpenCVMinDepVersions.cmake)
if(CMAKE_GENERATOR MATCHES Xcode AND XCODE_VERSION VERSION_GREATER 4.3)
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
elseif(CMAKE_SYSTEM_NAME MATCHES WindowsPhone OR CMAKE_SYSTEM_NAME MATCHES WindowsStore)
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
#Required to resolve linker error issues due to incompatibility with CMake v3.0+ policies.
#CMake fails to find _fseeko() which leads to subsequent linker error.
#See details here: http://www.cmake.org/Wiki/CMake/Policies
cmake_policy(VERSION 2.8)
else()
cmake_minimum_required(VERSION "${MIN_VER_CMAKE}" FATAL_ERROR)
endif()
#
# Configure CMake policies
#
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) # CMAKE_CXX_COMPILER_ID=AppleClang
endif()
if(POLICY CMP0026)
cmake_policy(SET CMP0026 NEW)
endif()
if(POLICY CMP0042)
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) # warn about non-existed dependencies
endif()
if(POLICY CMP0051)
cmake_policy(SET CMP0051 NEW)
endif()
if(POLICY CMP0054) # CMake 3.1: Only interpret if() arguments as variables or keywords when unquoted.
cmake_policy(SET CMP0054 NEW)
endif()
if(POLICY CMP0056)
cmake_policy(SET CMP0056 NEW) # try_compile(): link flags
endif()
if(POLICY CMP0066)
cmake_policy(SET CMP0066 NEW) # CMake 3.7: try_compile(): use per-config flags, like CMAKE_CXX_FLAGS_RELEASE
endif()
if(POLICY CMP0067)
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()
if(POLICY CMP0075)
cmake_policy(SET CMP0075 NEW) # CMake 3.12+: Include file check macros honor `CMAKE_REQUIRED_LIBRARIES`
endif()
if(POLICY CMP0077)
cmake_policy(SET CMP0077 NEW) # CMake 3.13+: option() honors normal variables.
endif()
#
# Configure OpenCV CMake hooks
#
include(cmake/OpenCVUtils.cmake)
ocv_cmake_reset_hooks()
ocv_check_environment_variables(OPENCV_CMAKE_HOOKS_DIR)
if(DEFINED OPENCV_CMAKE_HOOKS_DIR)
foreach(__dir ${OPENCV_CMAKE_HOOKS_DIR})
get_filename_component(__dir "${__dir}" ABSOLUTE)
ocv_cmake_hook_register_dir(${__dir})
endforeach()
endif()
ocv_cmake_hook(CMAKE_INIT)
# 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}")
endif()
option(ENABLE_PIC "Generate position independent code (necessary for shared libraries)" TRUE)
set(CMAKE_POSITION_INDEPENDENT_CODE ${ENABLE_PIC})
ocv_cmake_hook(PRE_CMAKE_BOOTSTRAP)
# Bootstap CMake system: setup CMAKE_SYSTEM_NAME and other vars
enable_language(CXX C)
ocv_cmake_hook(POST_CMAKE_BOOTSTRAP)
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_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()
ocv_cmake_eval(DEBUG_PRE ONCE)
ocv_clear_vars(OpenCVModules_TARGETS)
include(cmake/OpenCVDownload.cmake)
set(BUILD_LIST "" CACHE STRING "Build only listed modules (comma-separated, e.g. 'videoio,dnn,ts')")
# ----------------------------------------------------------------------------
# Break in case of popular CMake configuration mistakes
# ----------------------------------------------------------------------------
if(NOT CMAKE_SIZEOF_VOID_P GREATER 0)
message(FATAL_ERROR "CMake fails to determine the bitness of the target platform.
Please check your CMake and compiler installation. If you are cross-compiling then ensure that your CMake toolchain file correctly sets the compiler details.")
endif()
# ----------------------------------------------------------------------------
# Detect compiler and target platform architecture
# ----------------------------------------------------------------------------
OCV_OPTION(ENABLE_CXX11 "Enable C++11 compilation mode" "${OPENCV_CXX11}")
include(cmake/OpenCVDetectCXXCompiler.cmake)
ocv_cmake_hook(POST_DETECT_COMPILER)
# Add these standard paths to the search paths for FIND_LIBRARY
# to find libraries from these locations first
if(UNIX AND NOT ANDROID)
if(X86_64 OR CMAKE_SIZEOF_VOID_P EQUAL 8)
if(EXISTS /lib64)
list(APPEND CMAKE_LIBRARY_PATH /lib64)
else()
list(APPEND CMAKE_LIBRARY_PATH /lib)
endif()
if(EXISTS /usr/lib64)
list(APPEND CMAKE_LIBRARY_PATH /usr/lib64)
else()
list(APPEND CMAKE_LIBRARY_PATH /usr/lib)
endif()
elseif(X86 OR CMAKE_SIZEOF_VOID_P EQUAL 4)
if(EXISTS /lib32)
list(APPEND CMAKE_LIBRARY_PATH /lib32)
else()
list(APPEND CMAKE_LIBRARY_PATH /lib)
endif()
if(EXISTS /usr/lib32)
list(APPEND CMAKE_LIBRARY_PATH /usr/lib32)
else()
list(APPEND CMAKE_LIBRARY_PATH /usr/lib)
endif()
endif()
endif()
# Add these standard paths to the search paths for FIND_PATH
# to find include files from these locations first
if(MINGW)
if(EXISTS /mingw)
list(APPEND CMAKE_INCLUDE_PATH /mingw)
endif()
if(EXISTS /mingw32)
list(APPEND CMAKE_INCLUDE_PATH /mingw32)
endif()
if(EXISTS /mingw64)
list(APPEND CMAKE_INCLUDE_PATH /mingw64)
endif()
endif()
# ----------------------------------------------------------------------------
# OpenCV cmake options
# ----------------------------------------------------------------------------
OCV_OPTION(OPENCV_ENABLE_NONFREE "Enable non-free algorithms" OFF)
# 3rd party libs
OCV_OPTION(OPENCV_FORCE_3RDPARTY_BUILD "Force using 3rdparty code from source" OFF)
OCV_OPTION(BUILD_ZLIB "Build zlib from source" (WIN32 OR APPLE OR OPENCV_FORCE_3RDPARTY_BUILD) )
OCV_OPTION(BUILD_TIFF "Build libtiff from source" (WIN32 OR ANDROID OR APPLE OR OPENCV_FORCE_3RDPARTY_BUILD) )
OCV_OPTION(BUILD_JASPER "Build libjasper from source" (WIN32 OR ANDROID OR APPLE OR OPENCV_FORCE_3RDPARTY_BUILD) )
OCV_OPTION(BUILD_JPEG "Build libjpeg from source" (WIN32 OR ANDROID OR APPLE OR OPENCV_FORCE_3RDPARTY_BUILD) )
OCV_OPTION(BUILD_PNG "Build libpng from source" (WIN32 OR ANDROID OR APPLE OR OPENCV_FORCE_3RDPARTY_BUILD) )
OCV_OPTION(BUILD_OPENEXR "Build openexr from source" (((WIN32 OR ANDROID OR APPLE) AND NOT WINRT) OR OPENCV_FORCE_3RDPARTY_BUILD) )
OCV_OPTION(BUILD_WEBP "Build WebP from source" (((WIN32 OR ANDROID OR APPLE) AND NOT WINRT
没有合适的资源?快使用搜索试试~ 我知道了~
opencv-3.4.13.zip
共2000个文件
cpp:811个
hpp:406个
py:185个
需积分: 0 1 下载量 86 浏览量
2024-09-14
10:07:00
上传
评论
收藏 158.31MB ZIP 举报
温馨提示
opencv3.4.13安装包
资源推荐
资源详情
资源评论
收起资源包目录
opencv-3.4.13.zip (2000个子文件)
CMakeCCompilerId.c 18KB
impl.c 15KB
feature_tests.c 688B
jni.c 563B
ts_gtest.cpp 407KB
connectedcomponents.cpp 240KB
ocl.cpp 219KB
colormap.cpp 175KB
softfloat.cpp 165KB
color_lab.cpp 165KB
resize.cpp 158KB
dxt.cpp 152KB
imgwarp.cpp 145KB
test_math.cpp 128KB
gl_core_3_1.cpp 124KB
cap_dshow.cpp 119KB
histogram.cpp 114KB
hog.cpp 112KB
test_color.cpp 101KB
datastructs.cpp 98KB
hershey_fonts.cpp 98KB
drawing.cpp 96KB
ts_func.cpp 94KB
mathfuncs.cpp 89KB
array.cpp 86KB
Mat.cpp 83KB
svm.cpp 80KB
test_filter.cpp 79KB
color.cpp 78KB
system.cpp 77KB
test_ds.cpp 77KB
ts_perf.cpp 75KB
arithm.cpp 74KB
test_arithm.cpp 72KB
test_mat.cpp 72KB
test_convhull.cpp 72KB
demosaicing.cpp 70KB
cap_v4l.cpp 69KB
min_enclosing_triangle.cpp 65KB
cap_libv4l.cpp 64KB
pyramids.cpp 64KB
hough.cpp 63KB
cap_gstreamer.cpp 63KB
directx.cpp 62KB
filter.dispatch.cpp 62KB
test_imgwarp.cpp 60KB
minmax.cpp 59KB
test_io.cpp 58KB
cap_ximea.cpp 58KB
contours.cpp 58KB
test_color.cpp 58KB
cap_qt.cpp 57KB
test_arithm.cpp 57KB
cap_msmf.cpp 56KB
test_histograms.cpp 55KB
tree.cpp 55KB
thresh.cpp 55KB
lapack.cpp 54KB
test_operations.cpp 53KB
shapedescr.cpp 52KB
ann_mlp.cpp 52KB
morph.dispatch.cpp 51KB
opengl.cpp 51KB
matrix_wrap.cpp 49KB
cap_mjpeg_encoder.cpp 49KB
copy.cpp 49KB
matrix_operations.cpp 47KB
norm.cpp 47KB
persistence_c.cpp 44KB
matrix_expressions.cpp 43KB
shapes.cpp 43KB
matmul.dispatch.cpp 42KB
persistence_types.cpp 42KB
test_imgwarp_strict.cpp 42KB
lda.cpp 42KB
gbt.cpp 40KB
cap_openni.cpp 40KB
templmatch.cpp 40KB
umatrix.cpp 39KB
test_umat.cpp 38KB
OcvTransform.cpp 38KB
btv_l1.cpp 37KB
cap_dc1394.cpp 37KB
cap_openni2.cpp 36KB
data.cpp 36KB
vtkVizInteractorStyle.cpp 35KB
emd.cpp 35KB
cap_gphoto2.cpp 35KB
canny.cpp 35KB
perf_arithm.cpp 35KB
grfmt_tiff.cpp 35KB
opencl-opencv-interop.cpp 34KB
matrix.cpp 34KB
trace.cpp 34KB
ts.cpp 34KB
cuda_info.cpp 33KB
persistence_xml.cpp 33KB
loadsave.cpp 32KB
deriv.cpp 32KB
rand.cpp 32KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
是帅气的二狗
- 粉丝: 38
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- ESP32人脸识别开发板原理图
- 【Unity样条线工具】Curvy Splines
- ESP32带屏原理图,带USB 和调试
- 【Unity移动游戏UI资源包】Cartoon GUI Pack-轻松创建卡通外观游戏的UI元素
- MDP环境下的Python强化学习任务实现指南
- 华为项目管理10大模板(可直接套用)
- 基于Masked Graph Attention Networks的漏洞情报对齐方法
- Jvm最新面试题,常见面试题及答案汇总.md
- MATLAB车牌定位面板.zip
- 暴风电视刷机 65X4 ECHO 屏V650DJ4-QS5 机编60000AM0G00 屏参30173302 V4.0.31版本
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功