Merge pull request #1110 from SpecLad:config-cleanup

This commit is contained in:
Andrey Pavlenko 2013-07-30 17:39:35 +04:00 committed by OpenCV Buildbot
commit f7ce70f70a
40 changed files with 233 additions and 426 deletions

View File

@ -1,4 +1,3 @@
set(NEW_FFMPEG 1)
set(HAVE_FFMPEG_CODEC 1)
set(HAVE_FFMPEG_FORMAT 1)
set(HAVE_FFMPEG_UTIL 1)

View File

@ -296,7 +296,6 @@ endif()
# Path for build/platform -specific headers
# ----------------------------------------------------------------------------
set(OPENCV_CONFIG_FILE_INCLUDE_DIR "${CMAKE_BINARY_DIR}/" CACHE PATH "Where to create the platform-dependant cvconfig.h")
add_definitions(-DHAVE_CVCONFIG_H)
ocv_include_directories(${OPENCV_CONFIG_FILE_INCLUDE_DIR})
# ----------------------------------------------------------------------------
@ -370,9 +369,6 @@ if(UNIX)
include(CheckIncludeFile)
if(NOT APPLE)
CHECK_INCLUDE_FILE(alloca.h HAVE_ALLOCA_H)
CHECK_FUNCTION_EXISTS(alloca HAVE_ALLOCA)
CHECK_INCLUDE_FILE(unistd.h HAVE_UNISTD_H)
CHECK_INCLUDE_FILE(pthread.h HAVE_LIBPTHREAD)
if(ANDROID)
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} dl m log)
@ -382,7 +378,7 @@ if(UNIX)
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} dl m pthread rt)
endif()
else()
add_definitions(-DHAVE_ALLOCA -DHAVE_ALLOCA_H -DHAVE_LIBPTHREAD -DHAVE_UNISTD_H)
set(HAVE_LIBPTHREAD YES)
endif()
endif()

View File

@ -65,3 +65,12 @@ if(WITH_OPENGL)
endif()
endif()
endif(WITH_OPENGL)
# --- Carbon & Cocoa ---
if(APPLE)
if(WITH_CARBON)
set(HAVE_CARBON YES)
elif(NOT IOS)
set(HAVE_COCOA YES)
endif()
endif()

View File

@ -36,9 +36,8 @@ if(WITH_TIFF)
ocv_parse_header("${TIFF_INCLUDE_DIR}/tiff.h" TIFF_VERSION_LINES TIFF_VERSION_CLASSIC TIFF_VERSION_BIG TIFF_VERSION TIFF_BIGTIFF_VERSION)
endif()
endif()
endif()
if(WITH_TIFF AND NOT TIFF_FOUND)
if(NOT TIFF_FOUND)
ocv_clear_vars(TIFF_LIBRARY TIFF_LIBRARIES TIFF_INCLUDE_DIR)
set(TIFF_LIBRARY libtiff)
@ -46,17 +45,17 @@ if(WITH_TIFF AND NOT TIFF_FOUND)
add_subdirectory("${OpenCV_SOURCE_DIR}/3rdparty/libtiff")
set(TIFF_INCLUDE_DIR "${${TIFF_LIBRARY}_SOURCE_DIR}" "${${TIFF_LIBRARY}_BINARY_DIR}")
ocv_parse_header("${${TIFF_LIBRARY}_SOURCE_DIR}/tiff.h" TIFF_VERSION_LINES TIFF_VERSION_CLASSIC TIFF_VERSION_BIG TIFF_VERSION TIFF_BIGTIFF_VERSION)
endif()
endif()
if(TIFF_VERSION_CLASSIC AND NOT TIFF_VERSION)
if(TIFF_VERSION_CLASSIC AND NOT TIFF_VERSION)
set(TIFF_VERSION ${TIFF_VERSION_CLASSIC})
endif()
endif()
if(TIFF_BIGTIFF_VERSION AND NOT TIFF_VERSION_BIG)
if(TIFF_BIGTIFF_VERSION AND NOT TIFF_VERSION_BIG)
set(TIFF_VERSION_BIG ${TIFF_BIGTIFF_VERSION})
endif()
endif()
if(NOT TIFF_VERSION_STRING AND TIFF_INCLUDE_DIR)
if(NOT TIFF_VERSION_STRING AND TIFF_INCLUDE_DIR)
list(GET TIFF_INCLUDE_DIR 0 _TIFF_INCLUDE_DIR)
if(EXISTS "${_TIFF_INCLUDE_DIR}/tiffvers.h")
file(STRINGS "${_TIFF_INCLUDE_DIR}/tiffvers.h" tiff_version_str REGEX "^#define[\t ]+TIFFLIB_VERSION_STR[\t ]+\"LIBTIFF, Version .*")
@ -64,29 +63,32 @@ if(NOT TIFF_VERSION_STRING AND TIFF_INCLUDE_DIR)
unset(tiff_version_str)
endif()
unset(_TIFF_INCLUDE_DIR)
endif()
set(HAVE_TIFF YES)
endif()
# --- libjpeg (optional) ---
if(WITH_JPEG AND NOT IOS)
if(WITH_JPEG)
if(BUILD_JPEG)
ocv_clear_vars(JPEG_FOUND)
else()
include(FindJPEG)
endif()
endif()
if(WITH_JPEG AND NOT JPEG_FOUND)
if(NOT JPEG_FOUND)
ocv_clear_vars(JPEG_LIBRARY JPEG_LIBRARIES JPEG_INCLUDE_DIR)
set(JPEG_LIBRARY libjpeg)
set(JPEG_LIBRARIES ${JPEG_LIBRARY})
add_subdirectory("${OpenCV_SOURCE_DIR}/3rdparty/libjpeg")
set(JPEG_INCLUDE_DIR "${${JPEG_LIBRARY}_SOURCE_DIR}")
endif()
ocv_parse_header("${JPEG_INCLUDE_DIR}/jpeglib.h" JPEG_VERSION_LINES JPEG_LIB_VERSION)
set(HAVE_JPEG YES)
endif()
ocv_parse_header("${JPEG_INCLUDE_DIR}/jpeglib.h" JPEG_VERSION_LINES JPEG_LIB_VERSION)
# --- libjasper (optional, should be searched after libjpeg) ---
if(WITH_JASPER)
if(BUILD_JASPER)
@ -94,19 +96,21 @@ if(WITH_JASPER)
else()
include(FindJasper)
endif()
endif()
if(WITH_JASPER AND NOT JASPER_FOUND)
if(NOT JASPER_FOUND)
ocv_clear_vars(JASPER_LIBRARY JASPER_LIBRARIES JASPER_INCLUDE_DIR)
set(JASPER_LIBRARY libjasper)
set(JASPER_LIBRARIES ${JASPER_LIBRARY})
add_subdirectory("${OpenCV_SOURCE_DIR}/3rdparty/libjasper")
set(JASPER_INCLUDE_DIR "${${JASPER_LIBRARY}_SOURCE_DIR}")
endif()
endif()
if(NOT JASPER_VERSION_STRING)
set(HAVE_JASPER YES)
if(NOT JASPER_VERSION_STRING)
ocv_parse_header2(JASPER "${JASPER_INCLUDE_DIR}/jasper/jas_config.h" JAS_VERSION "")
endif()
endif()
# --- libpng (optional, should be searched after zlib) ---
@ -117,19 +121,17 @@ if(WITH_PNG AND NOT IOS)
include(FindPNG)
if(PNG_FOUND)
include(CheckIncludeFile)
check_include_file("${PNG_PNG_INCLUDE_DIR}/png.h" HAVE_PNG_H)
check_include_file("${PNG_PNG_INCLUDE_DIR}/libpng/png.h" HAVE_LIBPNG_PNG_H)
if(HAVE_PNG_H)
ocv_parse_header("${PNG_PNG_INCLUDE_DIR}/png.h" PNG_VERSION_LINES PNG_LIBPNG_VER_MAJOR PNG_LIBPNG_VER_MINOR PNG_LIBPNG_VER_RELEASE)
elseif(HAVE_LIBPNG_PNG_H)
if(HAVE_LIBPNG_PNG_H)
ocv_parse_header("${PNG_PNG_INCLUDE_DIR}/libpng/png.h" PNG_VERSION_LINES PNG_LIBPNG_VER_MAJOR PNG_LIBPNG_VER_MINOR PNG_LIBPNG_VER_RELEASE)
else()
ocv_parse_header("${PNG_PNG_INCLUDE_DIR}/png.h" PNG_VERSION_LINES PNG_LIBPNG_VER_MAJOR PNG_LIBPNG_VER_MINOR PNG_LIBPNG_VER_RELEASE)
endif()
endif()
endif()
endif()
if(WITH_PNG AND NOT PNG_FOUND)
ocv_clear_vars(PNG_LIBRARY PNG_LIBRARIES PNG_INCLUDE_DIR PNG_PNG_INCLUDE_DIR HAVE_PNG_H HAVE_LIBPNG_PNG_H PNG_DEFINITIONS)
if(NOT PNG_FOUND)
ocv_clear_vars(PNG_LIBRARY PNG_LIBRARIES PNG_INCLUDE_DIR PNG_PNG_INCLUDE_DIR HAVE_LIBPNG_PNG_H PNG_DEFINITIONS)
set(PNG_LIBRARY libpng)
set(PNG_LIBRARIES ${PNG_LIBRARY})
@ -137,9 +139,11 @@ if(WITH_PNG AND NOT PNG_FOUND)
set(PNG_INCLUDE_DIR "${${PNG_LIBRARY}_SOURCE_DIR}")
set(PNG_DEFINITIONS "")
ocv_parse_header("${PNG_INCLUDE_DIR}/png.h" PNG_VERSION_LINES PNG_LIBPNG_VER_MAJOR PNG_LIBPNG_VER_MINOR PNG_LIBPNG_VER_RELEASE)
endif()
endif()
set(PNG_VERSION "${PNG_LIBPNG_VER_MAJOR}.${PNG_LIBPNG_VER_MINOR}.${PNG_LIBPNG_VER_RELEASE}")
set(HAVE_PNG YES)
set(PNG_VERSION "${PNG_LIBPNG_VER_MAJOR}.${PNG_LIBPNG_VER_MINOR}.${PNG_LIBPNG_VER_RELEASE}")
endif()
# --- OpenEXR (optional) ---
if(WITH_OPENEXR)
@ -148,17 +152,24 @@ if(WITH_OPENEXR)
else()
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindOpenEXR.cmake")
endif()
endif()
if(WITH_OPENEXR AND NOT OPENEXR_FOUND)
if(NOT OPENEXR_FOUND)
ocv_clear_vars(OPENEXR_INCLUDE_PATHS OPENEXR_LIBRARIES OPENEXR_ILMIMF_LIBRARY OPENEXR_VERSION)
set(OPENEXR_LIBRARIES IlmImf)
set(OPENEXR_ILMIMF_LIBRARY IlmImf)
add_subdirectory("${OpenCV_SOURCE_DIR}/3rdparty/openexr")
endif()
set(HAVE_OPENEXR YES)
endif()
#cmake 2.8.2 bug - it fails to determine zlib version
if(ZLIB_FOUND)
ocv_parse_header2(ZLIB "${ZLIB_INCLUDE_DIR}/zlib.h" ZLIB_VERSION)
endif()
# --- Apple ImageIO ---
if(WITH_IMAGEIO)
set(HAVE_IMAGEIO YES)
endif()

View File

@ -228,3 +228,13 @@ if(WIN32)
list(APPEND HIGHGUI_LIBRARIES winmm)
endif()
endif(WIN32)
# --- Apple AV Foundation ---
if(WITH_AVFOUNDATION)
set(HAVE_AVFOUNDATION YES)
endif()
# --- QuickTime ---
if(WITH_QUICKTIME)
set(HAVE_QUICKTIME YES)
endif()

View File

@ -1,13 +1,3 @@
# ----------------------------------------------------------------------------
# Variables for cvconfig.h.cmake
# ----------------------------------------------------------------------------
set(PACKAGE "opencv")
set(PACKAGE_BUGREPORT "opencvlibrary-devel@lists.sourceforge.net")
set(PACKAGE_NAME "opencv")
set(PACKAGE_STRING "${PACKAGE} ${OPENCV_VERSION}")
set(PACKAGE_TARNAME "${PACKAGE}")
set(PACKAGE_VERSION "${OPENCV_VERSION}")
# platform-specific config file
configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/cvconfig.h.cmake" "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/cvconfig.h")

View File

@ -12,7 +12,6 @@ set(prefix "${CMAKE_INSTALL_PREFIX}")
set(exec_prefix "\${prefix}")
set(libdir "") #TODO: need link paths for OpenCV_EXTRA_COMPONENTS
set(includedir "\${prefix}/${OPENCV_INCLUDE_INSTALL_PATH}")
set(VERSION ${OPENCV_VERSION})
if(CMAKE_BUILD_TYPE MATCHES "Release")
set(ocv_optkind OPT)

View File

@ -1,20 +1,20 @@
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
systems. This function is required for `alloca.c' support on those systems.
*/
#cmakedefine CRAY_STACKSEG_END
/* OpenCV compiled as static or dynamic libs */
#cmakedefine BUILD_SHARED_LIBS
/* Define to 1 if using `alloca.c'. */
#cmakedefine C_ALLOCA
/* Compile for 'real' NVIDIA GPU architectures */
#define CUDA_ARCH_BIN "${OPENCV_CUDA_ARCH_BIN}"
/* Define to 1 if you have `alloca', as a function or macro. */
#cmakedefine HAVE_ALLOCA 1
/* Create PTX or BIN for 1.0 compute capability */
#cmakedefine CUDA_ARCH_BIN_OR_PTX_10
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
*/
#cmakedefine HAVE_ALLOCA_H 1
/* NVIDIA GPU features are used */
#define CUDA_ARCH_FEATURES "${OPENCV_CUDA_ARCH_FEATURES}"
/* Video for Windows support */
#cmakedefine HAVE_VFW
/* Compile for 'virtual' NVIDIA PTX architectures */
#define CUDA_ARCH_PTX "${OPENCV_CUDA_ARCH_PTX}"
/* AVFoundation video libraries */
#cmakedefine HAVE_AVFOUNDATION
/* V4L capturing support */
#cmakedefine HAVE_CAMV4L
@ -22,15 +22,30 @@
/* V4L2 capturing support */
#cmakedefine HAVE_CAMV4L2
/* V4L2 capturing support in videoio.h */
#cmakedefine HAVE_VIDEOIO
/* V4L/V4L2 capturing support via libv4l */
#cmakedefine HAVE_LIBV4L
/* Carbon windowing environment */
#cmakedefine HAVE_CARBON
/* AMD's Basic Linear Algebra Subprograms Library*/
#cmakedefine HAVE_CLAMDBLAS
/* AMD's OpenCL Fast Fourier Transform Library*/
#cmakedefine HAVE_CLAMDFFT
/* Cocoa API */
#cmakedefine HAVE_COCOA
/* C= */
#cmakedefine HAVE_CSTRIPES
/* NVidia Cuda Basic Linear Algebra Subprograms (BLAS) API*/
#cmakedefine HAVE_CUBLAS
/* NVidia Cuda Runtime API*/
#cmakedefine HAVE_CUDA
/* NVidia Cuda Fast Fourier Transform (FFT) API*/
#cmakedefine HAVE_CUFFT
/* IEEE1394 capturing support */
#cmakedefine HAVE_DC1394
@ -40,38 +55,35 @@
/* IEEE1394 capturing support - libdc1394 v2.x */
#cmakedefine HAVE_DC1394_2
/* ffmpeg in Gentoo */
#cmakedefine HAVE_GENTOO_FFMPEG
/* DirectShow Video Capture library */
#cmakedefine HAVE_DSHOW
/* Eigen Matrix & Linear Algebra Library */
#cmakedefine HAVE_EIGEN
/* FFMpeg video library */
#cmakedefine HAVE_FFMPEG
/* FFMpeg version flag */
#cmakedefine NEW_FFMPEG
/* ffmpeg's libswscale */
#cmakedefine HAVE_FFMPEG_SWSCALE
/* ffmpeg in Gentoo */
#cmakedefine HAVE_GENTOO_FFMPEG
/* GStreamer multimedia framework */
#cmakedefine HAVE_GSTREAMER
/* GTK+ 2.0 Thread support */
#cmakedefine HAVE_GTHREAD
/* Win32 UI */
#cmakedefine HAVE_WIN32UI
/* GTK+ 2.x toolkit */
#cmakedefine HAVE_GTK
/* OpenEXR codec */
#cmakedefine HAVE_ILMIMF
/* Apple ImageIO Framework */
#cmakedefine HAVE_IMAGEIO
/* Define to 1 if you have the <inttypes.h> header file. */
#cmakedefine HAVE_INTTYPES_H 1
/* Intel Integrated Performance Primitives */
#cmakedefine HAVE_IPP
/* JPEG-2000 codec */
#cmakedefine HAVE_JASPER
@ -79,41 +91,44 @@
/* IJG JPEG codec */
#cmakedefine HAVE_JPEG
/* Define to 1 if you have the `dl' library (-ldl). */
#cmakedefine HAVE_LIBDL 1
/* Define to 1 if you have the `gomp' library (-lgomp). */
#cmakedefine HAVE_LIBGOMP 1
/* Define to 1 if you have the `m' library (-lm). */
#cmakedefine HAVE_LIBM 1
/* libpng/png.h needs to be included */
#cmakedefine HAVE_LIBPNG_PNG_H
/* Define to 1 if you have the `pthread' library (-lpthread). */
#cmakedefine HAVE_LIBPTHREAD 1
/* V4L/V4L2 capturing support via libv4l */
#cmakedefine HAVE_LIBV4L
/* Define to 1 if you have the `lrint' function. */
#cmakedefine HAVE_LRINT 1
/* Microsoft Media Foundation Capture library */
#cmakedefine HAVE_MSMF
/* NVidia Video Decoding API*/
#cmakedefine HAVE_NVCUVID
/* OpenCL Support */
#cmakedefine HAVE_OPENCL
/* OpenEXR codec */
#cmakedefine HAVE_OPENEXR
/* OpenGL support*/
#cmakedefine HAVE_OPENGL
/* OpenNI library */
#cmakedefine HAVE_OPENNI
/* PNG codec */
#cmakedefine HAVE_PNG
/* Define to 1 if you have the `png_get_valid' function. */
#cmakedefine HAVE_PNG_GET_VALID 1
/* Qt support */
#cmakedefine HAVE_QT
/* png.h needs to be included */
#cmakedefine HAVE_PNG_H
/* Define to 1 if you have the `png_set_tRNS_to_alpha' function. */
#cmakedefine HAVE_PNG_SET_TRNS_TO_ALPHA 1
/* Qt OpenGL support */
#cmakedefine HAVE_QT_OPENGL
/* QuickTime video libraries */
#cmakedefine HAVE_QUICKTIME
/* AVFoundation video libraries */
#cmakedefine HAVE_AVFOUNDATION
/* Intel Threading Building Blocks */
#cmakedefine HAVE_TBB
/* TIFF codec */
#cmakedefine HAVE_TIFF
@ -121,116 +136,22 @@
/* Unicap video capture library */
#cmakedefine HAVE_UNICAP
/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H 1
/* Video for Windows support */
#cmakedefine HAVE_VFW
/* V4L2 capturing support in videoio.h */
#cmakedefine HAVE_VIDEOIO
/* Win32 UI */
#cmakedefine HAVE_WIN32UI
/* XIMEA camera support */
#cmakedefine HAVE_XIMEA
/* Xine video library */
#cmakedefine HAVE_XINE
/* OpenNI library */
#cmakedefine HAVE_OPENNI
/* LZ77 compression/decompression library (used for PNG) */
#cmakedefine HAVE_ZLIB
/* Intel Integrated Performance Primitives */
#cmakedefine HAVE_IPP
/* OpenCV compiled as static or dynamic libs */
#cmakedefine BUILD_SHARED_LIBS
/* Name of package */
#define PACKAGE "${PACKAGE}"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "${PACKAGE_BUGREPORT}"
/* Define to the full name of this package. */
#define PACKAGE_NAME "${PACKAGE_NAME}"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "${PACKAGE_STRING}"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "${PACKAGE_TARNAME}"
/* Define to the version of this package. */
#define PACKAGE_VERSION "${PACKAGE_VERSION}"
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at runtime.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
#cmakedefine STACK_DIRECTION
/* Version number of package */
#define VERSION "${PACKAGE_VERSION}"
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#cmakedefine WORDS_BIGENDIAN
/* Intel Threading Building Blocks */
#cmakedefine HAVE_TBB
/* C= */
#cmakedefine HAVE_CSTRIPES
/* Eigen Matrix & Linear Algebra Library */
#cmakedefine HAVE_EIGEN
/* NVidia Cuda Runtime API*/
#cmakedefine HAVE_CUDA
/* NVidia Cuda Fast Fourier Transform (FFT) API*/
#cmakedefine HAVE_CUFFT
/* NVidia Cuda Basic Linear Algebra Subprograms (BLAS) API*/
#cmakedefine HAVE_CUBLAS
/* NVidia Video Decoding API*/
#cmakedefine HAVE_NVCUVID
/* Compile for 'real' NVIDIA GPU architectures */
#define CUDA_ARCH_BIN "${OPENCV_CUDA_ARCH_BIN}"
/* Compile for 'virtual' NVIDIA PTX architectures */
#define CUDA_ARCH_PTX "${OPENCV_CUDA_ARCH_PTX}"
/* NVIDIA GPU features are used */
#define CUDA_ARCH_FEATURES "${OPENCV_CUDA_ARCH_FEATURES}"
/* Create PTX or BIN for 1.0 compute capability */
#cmakedefine CUDA_ARCH_BIN_OR_PTX_10
/* OpenCL Support */
#cmakedefine HAVE_OPENCL
/* AMD's OpenCL Fast Fourier Transform Library*/
#cmakedefine HAVE_CLAMDFFT
/* AMD's Basic Linear Algebra Subprograms Library*/
#cmakedefine HAVE_CLAMDBLAS
/* DirectShow Video Capture library */
#cmakedefine HAVE_DSHOW
/* Microsoft Media Foundation Capture library */
#cmakedefine HAVE_MSMF
/* XIMEA camera support */
#cmakedefine HAVE_XIMEA
/* OpenGL support*/
#cmakedefine HAVE_OPENGL
/* Clp support */
#cmakedefine HAVE_CLP
/* Qt support */
#cmakedefine HAVE_QT
/* Qt OpenGL support */
#cmakedefine HAVE_QT_OPENGL

View File

@ -8,6 +8,6 @@ includedir_new=@includedir@
Name: OpenCV
Description: Open Source Computer Vision Library
Version: @VERSION@
Version: @OPENCV_VERSION@
Libs: @OpenCV_LIB_COMPONENTS@
Cflags: -I${includedir_old} -I${includedir_new}

View File

@ -42,9 +42,7 @@
#ifndef __OPENCV_PRECOMP_H__
#define __OPENCV_PRECOMP_H__
#ifdef HAVE_CVCONFIG_H
#include "cvconfig.h"
#endif
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/imgproc/imgproc.hpp"

View File

@ -43,9 +43,7 @@
#ifndef __OPENCV_PRECOMP_H__
#define __OPENCV_PRECOMP_H__
#ifdef HAVE_CVCONFIG_H
#include "cvconfig.h"
#endif
#include "opencv2/contrib/contrib.hpp"
#include "opencv2/features2d/features2d.hpp"

View File

@ -340,25 +340,6 @@ namespace cv
* Common declarations *
\****************************************************************************************/
/* get alloca declaration */
#ifdef __GNUC__
# undef alloca
# define alloca __builtin_alloca
# define CV_HAVE_ALLOCA 1
#elif defined WIN32 || defined _WIN32 || \
defined WINCE || defined _MSC_VER || defined __BORLANDC__
# include <malloc.h>
# define CV_HAVE_ALLOCA 1
#elif defined HAVE_ALLOCA_H
# include <alloca.h>
# define CV_HAVE_ALLOCA 1
#elif defined HAVE_ALLOCA
# include <stdlib.h>
# define CV_HAVE_ALLOCA 1
#else
# undef CV_HAVE_ALLOCA
#endif
#ifdef __GNUC__
# define CV_DECL_ALIGNED(x) __attribute__ ((aligned (x)))
#elif defined _MSC_VER
@ -367,11 +348,6 @@ namespace cv
# define CV_DECL_ALIGNED(x)
#endif
#if CV_HAVE_ALLOCA
/* ! DO NOT make it an inline function */
# define cvStackAlloc(size) cvAlignPtr( alloca((size) + CV_MALLOC_ALIGN), CV_MALLOC_ALIGN )
#endif
#ifndef CV_IMPL
# define CV_IMPL CV_EXTERN_C
#endif

View File

@ -317,7 +317,7 @@ CV_INLINE int cvRound( double value )
return t;
#elif defined _MSC_VER && defined _M_ARM && defined HAVE_TEGRA_OPTIMIZATION
TEGRA_ROUND(value);
#elif defined HAVE_LRINT || defined CV_ICC || defined __GNUC__
#elif defined CV_ICC || defined __GNUC__
# ifdef HAVE_TEGRA_OPTIMIZATION
TEGRA_ROUND(value);
# else

View File

@ -59,7 +59,6 @@
#endif
#if USE_ZLIB
# undef HAVE_UNISTD_H //to avoid redefinition
# ifndef _LFS64_LARGEFILE
# define _LFS64_LARGEFILE 0
# endif

View File

@ -43,9 +43,7 @@
#ifndef __OPENCV_PRECOMP_H__
#define __OPENCV_PRECOMP_H__
#ifdef HAVE_CVCONFIG_H
#include "cvconfig.h"
#endif
#include "opencv2/core/core.hpp"
#include "opencv2/core/core_c.h"

View File

@ -469,40 +469,6 @@ redirectError( CvErrorCallback errCallback, void* userdata, void** prevUserdata)
}
/*CV_IMPL int
cvGuiBoxReport( int code, const char *func_name, const char *err_msg,
const char *file, int line, void* )
{
#if (!defined WIN32 && !defined _WIN32) || defined WINCE
return cvStdErrReport( code, func_name, err_msg, file, line, 0 );
#else
if( code != CV_StsBackTrace && code != CV_StsAutoTrace )
{
size_t msg_len = strlen(err_msg ? err_msg : "") + 1024;
char* message = (char*)alloca(msg_len);
char title[100];
wsprintf( message, "%s (%s)\nin function %s, %s(%d)\n\n"
"Press \"Abort\" to terminate application.\n"
"Press \"Retry\" to debug (if the app is running under debugger).\n"
"Press \"Ignore\" to continue (this is not safe).\n",
cvErrorStr(code), err_msg ? err_msg : "no description",
func_name, file, line );
wsprintf( title, "OpenCV GUI Error Handler" );
int answer = MessageBox( NULL, message, title, MB_ICONERROR|MB_ABORTRETRYIGNORE|MB_SYSTEMMODAL );
if( answer == IDRETRY )
{
CV_DBG_BREAK();
}
return answer != IDIGNORE;
}
return 0;
#endif
}*/
CV_IMPL int cvCheckHardwareSupport(int feature)
{
CV_DbgAssert( 0 <= feature && feature <= CV_HARDWARE_MAX_FEATURE );

View File

@ -43,9 +43,7 @@
#ifndef __OPENCV_PRECOMP_H__
#define __OPENCV_PRECOMP_H__
#ifdef HAVE_CVCONFIG_H
#include "cvconfig.h"
#endif
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/imgproc/imgproc.hpp"

View File

@ -5,9 +5,7 @@
#include <cstdarg>
#include <sstream>
#ifdef HAVE_CVCONFIG_H
# include "cvconfig.h"
#endif
#include "opencv2/core/core.hpp"
#include "opencv2/core/internal.hpp"

View File

@ -42,9 +42,7 @@
#include <cstdio>
#ifdef HAVE_CVCONFIG_H
#include "cvconfig.h"
#endif
#include "opencv2/ts/ts.hpp"
#include "opencv2/ts/gpu_perf.hpp"

View File

@ -47,9 +47,7 @@
#pragma warning( disable: 4251 4710 4711 4514 4996 )
#endif
#ifdef HAVE_CVCONFIG_H
#include "cvconfig.h"
#endif
#include <cstring>
#include <iostream>

View File

@ -9,38 +9,33 @@ ocv_add_module(highgui opencv_imgproc OPTIONAL opencv_androidcamera)
ocv_clear_vars(GRFMT_LIBS)
if(WITH_PNG OR WITH_TIFF OR WITH_OPENEXR)
if(HAVE_PNG OR HAVE_TIFF OR HAVE_OPENEXR)
ocv_include_directories(${ZLIB_INCLUDE_DIR})
list(APPEND GRFMT_LIBS ${ZLIB_LIBRARIES})
endif()
if(WITH_JPEG)
add_definitions(-DHAVE_JPEG)
if(HAVE_JPEG)
ocv_include_directories(${JPEG_INCLUDE_DIR})
list(APPEND GRFMT_LIBS ${JPEG_LIBRARIES})
endif()
if(WITH_PNG)
add_definitions(-DHAVE_PNG)
if(HAVE_PNG)
add_definitions(${PNG_DEFINITIONS})
ocv_include_directories(${PNG_INCLUDE_DIR})
list(APPEND GRFMT_LIBS ${PNG_LIBRARIES})
endif()
if(WITH_TIFF)
add_definitions(-DHAVE_TIFF)
if(HAVE_TIFF)
ocv_include_directories(${TIFF_INCLUDE_DIR})
list(APPEND GRFMT_LIBS ${TIFF_LIBRARIES})
endif()
if(WITH_JASPER)
add_definitions(-DHAVE_JASPER)
if(HAVE_JASPER)
ocv_include_directories(${JASPER_INCLUDE_DIR})
list(APPEND GRFMT_LIBS ${JASPER_LIBRARIES})
endif()
if(WITH_OPENEXR)
add_definitions(-DHAVE_OPENEXR)
if(HAVE_OPENEXR)
include_directories(SYSTEM ${OPENEXR_INCLUDE_PATHS})
list(APPEND GRFMT_LIBS ${OPENEXR_LIBRARIES})
endif()
@ -108,16 +103,12 @@ elseif(HAVE_WIN32UI)
list(APPEND highgui_srcs src/window_w32.cpp)
elseif(HAVE_GTK)
list(APPEND highgui_srcs src/window_gtk.cpp)
elseif(APPLE)
if(WITH_CARBON)
add_definitions(-DHAVE_CARBON=1)
elseif(HAVE_CARBON)
list(APPEND highgui_srcs src/window_carbon.cpp)
list(APPEND HIGHGUI_LIBRARIES "-framework Carbon" "-framework QuickTime")
elseif(NOT IOS)
add_definitions(-DHAVE_COCOA=1)
elseif(HAVE_COCOA)
list(APPEND highgui_srcs src/window_cocoa.mm)
list(APPEND HIGHGUI_LIBRARIES "-framework Cocoa")
endif()
endif()
if(WIN32 AND NOT ARM)
@ -210,26 +201,21 @@ if(HAVE_GIGE_API)
list(APPEND highgui_srcs src/cap_giganetix.cpp)
endif(HAVE_GIGE_API)
if(WITH_IMAGEIO)
add_definitions(-DHAVE_IMAGEIO=1)
if(IOS)
if(HAVE_IMAGEIO AND IOS)
list(APPEND HIGHGUI_LIBRARIES "-framework ImageIO")
endif()
endif(WITH_IMAGEIO)
endif()
if(WITH_AVFOUNDATION)
add_definitions(-DHAVE_AVFOUNDATION=1)
if(HAVE_AVFOUNDATION)
list(APPEND highgui_srcs src/cap_avfoundation.mm)
list(APPEND HIGHGUI_LIBRARIES "-framework AVFoundation" "-framework QuartzCore")
elseif(APPLE)
add_definitions(-DHAVE_QUICKTIME=1)
if(WITH_QUICKTIME)
endif()
if(HAVE_QUICKTIME)
list(APPEND highgui_srcs src/cap_qt.cpp)
list(APPEND HIGHGUI_LIBRARIES "-framework Carbon" "-framework QuickTime" "-framework CoreFoundation" "-framework QuartzCore")
else()
elseif(APPLE)
list(APPEND highgui_srcs src/cap_qtkit.mm)
list(APPEND HIGHGUI_LIBRARIES "-framework QTKit" "-framework QuartzCore" "-framework AppKit")
endif()
endif()
if(IOS)

View File

@ -53,12 +53,6 @@
#endif
#endif
#undef PACKAGE
#undef PACKAGE_BUGREPORT
#undef PACKAGE_NAME
#undef PACKAGE_STRING
#undef PACKAGE_TARNAME
#undef PACKAGE_VERSION
#undef VERSION
#include <jasper/jasper.h>

View File

@ -51,7 +51,6 @@
and png2bmp sample from libpng distribution (Copyright (C) 1999-2001 MIYASAKA Masaru)
\****************************************************************************************/
#undef HAVE_UNISTD_H //to avoid redefinition
#ifndef _LFS64_LARGEFILE
# define _LFS64_LARGEFILE 0
#endif

View File

@ -9,9 +9,7 @@
#ifndef __OPENCV_TEST_PRECOMP_HPP__
#define __OPENCV_TEST_PRECOMP_HPP__
#ifdef HAVE_CVCONFIG_H
# include "cvconfig.h"
#endif
#include "opencv2/ts/ts.hpp"
#include "opencv2/imgproc/imgproc.hpp"

View File

@ -43,9 +43,7 @@
#ifndef __OPENCV_PRECOMP_H__
#define __OPENCV_PRECOMP_H__
#ifdef HAVE_CVCONFIG_H
#include "cvconfig.h"
#endif
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"

View File

@ -41,9 +41,7 @@
#ifndef __OPENCV_PRECOMP_H__
#define __OPENCV_PRECOMP_H__
#ifdef HAVE_CVCONFIG_H
#include "cvconfig.h"
#endif
#include "opencv2/legacy/legacy.hpp"

View File

@ -41,9 +41,7 @@
#ifndef __OPENCV_PRECOMP_H__
#define __OPENCV_PRECOMP_H__
#ifdef HAVE_CVCONFIG_H
#include "cvconfig.h"
#endif
#include "opencv2/ml/ml.hpp"
#include "opencv2/core/core_c.h"

View File

@ -43,9 +43,7 @@
#ifndef __OPENCV_PRECOMP_H__
#define __OPENCV_PRECOMP_H__
#ifdef HAVE_CVCONFIG_H
#include "cvconfig.h"
#endif
#include "opencv2/opencv_modules.hpp"

View File

@ -43,9 +43,7 @@
#ifndef __OPENCV_PRECOMP_H__
#define __OPENCV_PRECOMP_H__
#ifdef HAVE_CVCONFIG_H
#include "cvconfig.h"
#endif
#include "opencv2/objdetect/objdetect.hpp"
#include "opencv2/imgproc/imgproc.hpp"

View File

@ -44,9 +44,7 @@
#include <string>
#ifdef HAVE_CVCONFIG_H
#include "cvconfig.h"
#endif
#ifdef HAVE_TBB
#include "tbb/task_scheduler_init.h"

View File

@ -52,9 +52,7 @@
#pragma warning( disable: 4267 4324 4244 4251 4710 4711 4514 4996 )
#endif
#ifdef HAVE_CVCONFIG_H
#include "cvconfig.h"
#endif
#include <map>
#include <iostream>

View File

@ -43,9 +43,7 @@
#ifndef __OPENCV_PRECOMP_H__
#define __OPENCV_PRECOMP_H__
#ifdef HAVE_CVCONFIG_H
#include "cvconfig.h"
#endif
#include "opencv2/photo/photo.hpp"

View File

@ -43,9 +43,7 @@
#ifndef __OPENCV_STITCHING_PRECOMP_H__
#define __OPENCV_STITCHING_PRECOMP_H__
#ifdef HAVE_CVCONFIG_H
#include "cvconfig.h"
#endif
#include "opencv2/opencv_modules.hpp"
#include <vector>

View File

@ -51,9 +51,7 @@
#ifndef __OPENCV_PERF_PRECOMP_HPP__
#define __OPENCV_PERF_PRECOMP_HPP__
#ifdef HAVE_CVCONFIG_H
#include "cvconfig.h"
#endif
#include "opencv2/ts/ts.hpp"
#include "opencv2/ts/gpu_perf.hpp"

View File

@ -46,9 +46,7 @@
#include <vector>
#include <limits>
#ifdef HAVE_CVCONFIG_H
#include "cvconfig.h"
#endif
#include "opencv2/opencv_modules.hpp"
#include "opencv2/core/core.hpp"

View File

@ -51,9 +51,7 @@
#ifndef __OPENCV_TEST_PRECOMP_HPP__
#define __OPENCV_TEST_PRECOMP_HPP__
#ifdef HAVE_CVCONFIG_H
#include "cvconfig.h"
#endif
#include "opencv2/opencv_modules.hpp"
#include "opencv2/core/core.hpp"

View File

@ -1,9 +1,7 @@
#ifndef __OPENCV_GTESTCV_HPP__
#define __OPENCV_GTESTCV_HPP__
#ifdef HAVE_CVCONFIG_H
#include "cvconfig.h"
#endif
#ifndef GTEST_CREATE_SHARED_LIBRARY
#ifdef BUILD_SHARED_LIBS
#define GTEST_LINKED_AS_SHARED_LIBRARY 1

View File

@ -43,9 +43,7 @@
#ifndef __OPENCV_PRECOMP_H__
#define __OPENCV_PRECOMP_H__
#ifdef HAVE_CVCONFIG_H
#include "cvconfig.h"
#endif
#include "opencv2/video/tracking.hpp"
#include "opencv2/video/background_segm.hpp"

View File

@ -43,9 +43,7 @@
#ifndef __OPENCV_PRECOMP_HPP__
#define __OPENCV_PRECOMP_HPP__
#ifdef HAVE_CVCONFIG_H
#include "cvconfig.h"
#endif
#include <stdexcept>
#include <iostream>

View File

@ -43,9 +43,7 @@
#ifndef __OPENCV_PRECOMP_H__
#define __OPENCV_PRECOMP_H__
#ifdef HAVE_CVCONFIG_H
#include "cvconfig.h"
#endif
#include "opencv2/opencv_modules.hpp"
#ifdef HAVE_OPENCV_VIDEO