@ -12,6 +12,12 @@ include(cmake/OpenCVMinDepVersions.cmake)
if ( CMAKE_GENERATOR MATCHES Xcode AND XCODE_VERSION VERSION_GREATER 4.3 )
cmake_minimum_required ( VERSION 2.8.8 FATAL_ERROR )
elseif ( CMAKE_SYSTEM_NAME MATCHES WindowsPhone OR CMAKE_SYSTEM_NAME MATCHES WindowsStore )
cmake_minimum_required ( VERSION 3.1 FATAL_ERROR )
# R e q u i r e d t o r e s o l v e l i n k e r e r r o r i s s u e s d u e t o i n c o m p a t i b i l i t y w i t h C M a k e v 3 . 0 + p o l i c i e s .
# C M a k e f a i l s t o f i n d _fseeko ( ) w h i c h l e a d s t o s u b s e q u e n t l i n k e r e r r o r .
# S e e d e t a i l s h e r e : h t t p : / / w w w . c m a k e . o r g / W i k i / C M a k e / P o l i c i e s
cmake_policy ( VERSION 2.8 )
else ( )
cmake_minimum_required ( VERSION "${MIN_VER_CMAKE}" FATAL_ERROR )
endif ( )
@ -33,6 +39,13 @@ else(NOT CMAKE_TOOLCHAIN_FILE)
set ( CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "Installation Directory" )
endif ( NOT CMAKE_TOOLCHAIN_FILE )
if ( CMAKE_SYSTEM_NAME MATCHES WindowsPhone OR CMAKE_SYSTEM_NAME MATCHES WindowsStore )
set ( WINRT TRUE )
endif ( CMAKE_SYSTEM_NAME MATCHES WindowsPhone OR CMAKE_SYSTEM_NAME MATCHES WindowsStore )
if ( WINRT )
add_definitions ( -DWINRT -DNO_GETENV )
endif ( )
if ( POLICY CMP0022 )
cmake_policy ( SET CMP0022 OLD )
@ -120,66 +133,66 @@ endif()
# O p t i o n a l 3 r d p a r t y c o m p o n e n t s
# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
OCV_OPTION ( WITH_1394 "Include IEEE1394 support" ON IF ( NOT ANDROID AND NOT IOS ) )
OCV_OPTION ( WITH_1394 "Include IEEE1394 support" ON IF ( NOT ANDROID AND NOT IOS AND NOT WINRT ) )
OCV_OPTION ( WITH_AVFOUNDATION "Use AVFoundation for Video I/O" ON IF IOS )
OCV_OPTION ( WITH_CARBON "Use Carbon for UI instead of Cocoa" OFF IF APPLE )
OCV_OPTION ( WITH_VTK "Include VTK library support (and build opencv_viz module eiher)" ON IF ( NOT ANDROID AND NOT IOS ) )
OCV_OPTION ( WITH_CUDA "Include NVidia Cuda Runtime support" ON IF ( NOT IOS ) )
OCV_OPTION ( WITH_CUFFT "Include NVidia Cuda Fast Fourier Transform (FFT) library support" ON IF ( NOT IOS ) )
OCV_OPTION ( WITH_CUBLAS "Include NVidia Cuda Basic Linear Algebra Subprograms (BLAS) library support" OFF IF ( NOT IOS ) )
OCV_OPTION ( WITH_VTK "Include VTK library support (and build opencv_viz module eiher)" ON IF ( NOT ANDROID AND NOT IOS AND NOT WINRT ) )
OCV_OPTION ( WITH_CUDA "Include NVidia Cuda Runtime support" ON IF ( NOT IOS AND NOT WINRT ) )
OCV_OPTION ( WITH_CUFFT "Include NVidia Cuda Fast Fourier Transform (FFT) library support" ON IF ( NOT IOS AND NOT WINRT ) )
OCV_OPTION ( WITH_CUBLAS "Include NVidia Cuda Basic Linear Algebra Subprograms (BLAS) library support" OFF IF ( NOT IOS AND NOT WINRT ) )
OCV_OPTION ( WITH_NVCUVID "Include NVidia Video Decoding library support" OFF IF ( NOT IOS AND NOT APPLE ) )
OCV_OPTION ( WITH_EIGEN "Include Eigen2/Eigen3 support" ON )
OCV_OPTION ( WITH_EIGEN "Include Eigen2/Eigen3 support" ON IF ( NOT WINRT ) )
OCV_OPTION ( WITH_VFW "Include Video for Windows support" ON IF WIN32 )
OCV_OPTION ( WITH_FFMPEG "Include FFMPEG support" ON IF ( NOT ANDROID AND NOT IOS ) )
OCV_OPTION ( WITH_FFMPEG "Include FFMPEG support" ON IF ( NOT ANDROID AND NOT IOS AND NOT WINRT ) )
OCV_OPTION ( WITH_GSTREAMER "Include Gstreamer support" ON IF ( UNIX AND NOT ANDROID ) )
OCV_OPTION ( WITH_GSTREAMER_0_10 "Enable Gstreamer 0.10 support (instead of 1.x)" OFF )
OCV_OPTION ( WITH_GTK "Include GTK support" ON IF ( UNIX AND NOT APPLE AND NOT ANDROID ) )
OCV_OPTION ( WITH_GTK_2_X "Use GTK version 2" OFF IF ( UNIX AND NOT APPLE AND NOT ANDROID ) )
OCV_OPTION ( WITH_IPP "Include Intel IPP support" ON IF ( X86_64 OR X86 ) )
OCV_OPTION ( WITH_IPP "Include Intel IPP support" ON IF ( X86_64 OR X86 ) AND NOT WINRT )
OCV_OPTION ( WITH_JASPER "Include JPEG2K support" ON IF ( NOT IOS ) )
OCV_OPTION ( WITH_JPEG "Include JPEG support" ON )
OCV_OPTION ( WITH_WEBP "Include WebP support" ON IF ( NOT IOS ) )
OCV_OPTION ( WITH_OPENEXR "Include ILM support via OpenEXR" ON IF ( NOT IOS ) )
OCV_OPTION ( WITH_OPENGL "Include OpenGL support" OFF IF ( NOT ANDROID ) )
OCV_OPTION ( WITH_OPENNI "Include OpenNI support" OFF IF ( NOT ANDROID AND NOT IOS ) )
OCV_OPTION ( WITH_OPENNI2 "Include OpenNI2 support" OFF IF ( NOT ANDROID AND NOT IOS ) )
OCV_OPTION ( WITH_WEBP "Include WebP support" ON IF ( NOT IOS AND NOT WINRT ) )
OCV_OPTION ( WITH_OPENEXR "Include ILM support via OpenEXR" ON IF ( NOT IOS AND NOT WINRT ) )
OCV_OPTION ( WITH_OPENGL "Include OpenGL support" OFF IF ( NOT ANDROID AND NOT WINRT ) )
OCV_OPTION ( WITH_OPENNI "Include OpenNI support" OFF IF ( NOT ANDROID AND NOT IOS AND NOT WINRT ) )
OCV_OPTION ( WITH_OPENNI2 "Include OpenNI2 support" OFF IF ( NOT ANDROID AND NOT IOS AND NOT WINRT ) )
OCV_OPTION ( WITH_PNG "Include PNG support" ON )
OCV_OPTION ( WITH_PVAPI "Include Prosilica GigE support" ON IF ( NOT ANDROID AND NOT IOS ) )
OCV_OPTION ( WITH_GIGEAPI "Include Smartek GigE support" ON IF ( NOT ANDROID AND NOT IOS ) )
OCV_OPTION ( WITH_QT "Build with Qt Backend support" OFF IF ( NOT ANDROID AND NOT IOS ) )
OCV_OPTION ( WITH_WIN32UI "Build with Win32 UI Backend support" ON IF WIN32 )
OCV_OPTION ( WITH_PVAPI "Include Prosilica GigE support" ON IF ( NOT ANDROID AND NOT IOS AND NOT WINRT ) )
OCV_OPTION ( WITH_GIGEAPI "Include Smartek GigE support" ON IF ( NOT ANDROID AND NOT IOS AND NOT WINRT ) )
OCV_OPTION ( WITH_QT "Build with Qt Backend support" OFF IF ( NOT ANDROID AND NOT IOS AND NOT WINRT ) )
OCV_OPTION ( WITH_WIN32UI "Build with Win32 UI Backend support" ON IF WIN32 AND NOT WINRT )
OCV_OPTION ( WITH_QUICKTIME "Use QuickTime for Video I/O insted of QTKit" OFF IF APPLE )
OCV_OPTION ( WITH_TBB "Include Intel TBB support" OFF IF ( NOT IOS ) )
OCV_OPTION ( WITH_TBB "Include Intel TBB support" OFF IF ( NOT IOS AND NOT WINRT ) )
OCV_OPTION ( WITH_OPENMP "Include OpenMP support" OFF )
OCV_OPTION ( WITH_CSTRIPES "Include C= support" OFF IF WIN32 )
OCV_OPTION ( WITH_CSTRIPES "Include C= support" OFF IF ( WIN32 AND NOT WINRT ) )
OCV_OPTION ( WITH_TIFF "Include TIFF support" ON IF ( NOT IOS ) )
OCV_OPTION ( WITH_UNICAP "Include Unicap support (GPL)" OFF IF ( UNIX AND NOT APPLE AND NOT ANDROID ) )
OCV_OPTION ( WITH_V4L "Include Video 4 Linux support" ON IF ( UNIX AND NOT ANDROID ) )
OCV_OPTION ( WITH_LIBV4L "Use libv4l for Video 4 Linux support" ON IF ( UNIX AND NOT ANDROID ) )
OCV_OPTION ( WITH_DSHOW "Build VideoIO with DirectShow support" ON IF ( WIN32 AND NOT ARM ) )
OCV_OPTION ( WITH_DSHOW "Build VideoIO with DirectShow support" ON IF ( WIN32 AND NOT ARM AND NOT WINRT ) )
OCV_OPTION ( WITH_MSMF "Build VideoIO with Media Foundation support" OFF IF WIN32 )
OCV_OPTION ( WITH_XIMEA "Include XIMEA cameras support" OFF IF ( NOT ANDROID ) )
OCV_OPTION ( WITH_XIMEA "Include XIMEA cameras support" OFF IF ( NOT ANDROID AND NOT WINRT ) )
OCV_OPTION ( WITH_XINE "Include Xine support (GPL)" OFF IF ( UNIX AND NOT APPLE AND NOT ANDROID ) )
OCV_OPTION ( WITH_CLP "Include Clp support (EPL)" OFF )
OCV_OPTION ( WITH_OPENCL "Include OpenCL Runtime support" NOT ANDROID IF ( NOT IOS ) )
OCV_OPTION ( WITH_OPENCL "Include OpenCL Runtime support" NOT ANDROID IF ( NOT IOS AND NOT WINRT ) )
OCV_OPTION ( WITH_OPENCL_SVM "Include OpenCL Shared Virtual Memory support" OFF ) # e x p e r i m e n t a l
OCV_OPTION ( WITH_OPENCLAMDFFT "Include AMD OpenCL FFT library support" ON IF ( NOT ANDROID AND NOT IOS ) )
OCV_OPTION ( WITH_OPENCLAMDBLAS "Include AMD OpenCL BLAS library support" ON IF ( NOT ANDROID AND NOT IOS ) )
OCV_OPTION ( WITH_DIRECTX "Include DirectX support" ON IF WIN32 )
OCV_OPTION ( WITH_INTELPERC "Include Intel Perceptual Computing support" OFF IF WIN32 )
OCV_OPTION ( WITH_OPENCLAMDFFT "Include AMD OpenCL FFT library support" ON IF ( NOT ANDROID AND NOT IOS AND NOT WINRT ) )
OCV_OPTION ( WITH_OPENCLAMDBLAS "Include AMD OpenCL BLAS library support" ON IF ( NOT ANDROID AND NOT IOS AND NOT WINRT ) )
OCV_OPTION ( WITH_DIRECTX "Include DirectX support" ON IF ( WIN32 AND NOT WINRT ) )
OCV_OPTION ( WITH_INTELPERC "Include Intel Perceptual Computing support" OFF IF ( WIN32 AND NOT WINRT ) )
OCV_OPTION ( WITH_IPP_A "Include Intel IPP_A support" OFF IF ( MSVC OR X86 OR X86_64 ) )
OCV_OPTION ( WITH_GDAL "Include GDAL Support" OFF IF ( NOT ANDROID AND NOT IOS ) )
OCV_OPTION ( WITH_GDAL "Include GDAL Support" OFF IF ( NOT ANDROID AND NOT IOS AND NOT WINRT ) )
# O p e n C V b u i l d c o m p o n e n t s
# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
OCV_OPTION ( BUILD_SHARED_LIBS "Build shared libraries (.dll/.so) instead of static ones (.lib/.a)" NOT ( ANDROID OR IOS ) )
OCV_OPTION ( BUILD_opencv_apps "Build utility applications (used for example to train classifiers)" ( NOT ANDROID ) IF ( NOT IOS ) )
OCV_OPTION ( BUILD_opencv_apps "Build utility applications (used for example to train classifiers)" ( NOT ANDROID AND NOT WINRT ) IF ( NOT IOS ) )
OCV_OPTION ( BUILD_ANDROID_EXAMPLES "Build examples for Android platform" ON IF ANDROID )
OCV_OPTION ( BUILD_DOCS "Create build rules for OpenCV Documentation" ON )
OCV_OPTION ( BUILD_DOCS "Create build rules for OpenCV Documentation" ON IF NOT WINRT )
OCV_OPTION ( BUILD_EXAMPLES "Build all examples" OFF )
OCV_OPTION ( BUILD_PACKAGE "Enables 'make package_source' command" ON )
OCV_OPTION ( BUILD_PERF_TESTS "Build performance tests" ON IF ( NOT IOS ) )
OCV_OPTION ( BUILD_TESTS "Build accuracy & regression tests" ON IF ( NOT IOS ) )
OCV_OPTION ( BUILD_PACKAGE "Enables 'make package_source' command" ON IF NOT WINRT )
OCV_OPTION ( BUILD_PERF_TESTS "Build performance tests" ON IF ( NOT IOS AND NOT WINRT ) )
OCV_OPTION ( BUILD_TESTS "Build accuracy & regression tests" ON IF ( NOT IOS AND NOT WINRT ) )
OCV_OPTION ( BUILD_WITH_DEBUG_INFO "Include debug info into debug libs (not MSCV only)" ON )
OCV_OPTION ( BUILD_WITH_STATIC_CRT "Enables use of staticaly linked CRT for staticaly linked OpenCV" ON IF MSVC )
OCV_OPTION ( BUILD_WITH_DYNAMIC_IPP "Enables dynamic linking of IPP (only for standalone IPP)" OFF )
@ -194,7 +207,7 @@ OCV_OPTION(BUILD_TIFF "Build libtiff from source" WIN32 O
OCV_OPTION ( BUILD_JASPER "Build libjasper from source" WIN32 OR ANDROID OR APPLE )
OCV_OPTION ( BUILD_JPEG "Build libjpeg from source" WIN32 OR ANDROID OR APPLE )
OCV_OPTION ( BUILD_PNG "Build libpng from source" WIN32 OR ANDROID OR APPLE )
OCV_OPTION ( BUILD_OPENEXR "Build openexr from source" WIN32 OR ANDROID OR APPLE )
OCV_OPTION ( BUILD_OPENEXR "Build openexr from source" ( WIN32 OR ANDROID OR APPLE ) AND NOT WINRT )
OCV_OPTION ( BUILD_TBB "Download and build TBB from source" ANDROID )
# O p e n C V i n s t a l l a t i o n o p t i o n s
@ -229,8 +242,6 @@ OCV_OPTION(ENABLE_NEON "Enable NEON instructions"
OCV_OPTION ( ENABLE_VFPV3 "Enable VFPv3-D32 instructions" OFF IF CMAKE_COMPILER_IS_GNUCXX AND ( ARM OR AARCH64 OR IOS ) )
OCV_OPTION ( ENABLE_NOISY_WARNINGS "Show all warnings even if they are too noisy" OFF )
OCV_OPTION ( OPENCV_WARNINGS_ARE_ERRORS "Treat warnings as errors" OFF )
OCV_OPTION ( ENABLE_WINRT_MODE "Build with Windows Runtime support" OFF IF WIN32 )
OCV_OPTION ( ENABLE_WINRT_MODE_NATIVE "Build with Windows Runtime native C++ support" OFF IF WIN32 )
OCV_OPTION ( ANDROID_EXAMPLES_WITH_LIBS "Build binaries of Android examples with native libraries" OFF IF ANDROID )
OCV_OPTION ( ENABLE_IMPL_COLLECTION "Collect implementation data on function call" OFF )
@ -759,11 +770,12 @@ endif()
# = = = = = = = = = = = = = = = = = = W i n d o w s R T f e a t u r e s = = = = = = = = = = = = = = = = = =
if ( WIN32 )
status ( "" )
status ( " Windows RT support:" HAVE_WINRT THEN YES ELSE NO )
if ( ENABLE_WINRT_MODE OR ENABLE_WINRT_MODE_NATIVE )
status ( " Windows SDK v8.0:" ${ WINDOWS_SDK_PATH } )
status ( " Visual Studio 2012:" ${ VISUAL_STUDIO_PATH } )
endif ( )
status ( " Windows RT support:" WINRT THEN YES ELSE NO )
if ( WINRT )
status ( " Building for Microsoft platform: " ${ CMAKE_SYSTEM_NAME } )
status ( " Building for architectures: " ${ CMAKE_VS_EFFECTIVE_PLATFORMS } )
status ( " Building for version: " ${ CMAKE_SYSTEM_VERSION } )
endif ( )
endif ( WIN32 )
# = = = = = = = = = = = = = = = = = = = = = = = = = = G U I = = = = = = = = = = = = = = = = = = = = = = = = = =
@ -913,7 +925,7 @@ endif(DEFINED WITH_OPENNI)
if ( DEFINED WITH_OPENNI2 )
status ( " OpenNI2:" HAVE_OPENNI2 THEN "YES (ver ${OPENNI2_VERSION_STRING}, build ${OPENNI2_VERSION_BUILD})"
E L S E N O )
E L S E N O )
endif ( DEFINED WITH_OPENNI2 )
if ( DEFINED WITH_PVAPI )