do not use WIN64/_WIN64 anymore - CMake did not set it anyway. Use WIN32 + __x86_64 or _M_X64 instead. Also, make VideoInput optional (WITH_VIDEOINPUT=ON/OFF) => now Mingw-dw2 can build OpenCV

This commit is contained in:
Vadim Pisarevsky
2010-07-16 22:38:57 +00:00
parent ba60094aca
commit 758e826d2e
24 changed files with 74 additions and 43 deletions

View File

@@ -45,7 +45,7 @@ namespace cv
{
// On Win64 optimized versions of DFT and DCT fail the tests (fixed in VS2010)
#if (defined WIN64 || defined _WIN64) && defined _MSC_VER && _MSC_VER < 1600
#if defined _MSC_VER && !defined CV_ICC && defined _M_X64 && _MSC_VER < 1600
#pragma optimize("", off)
#endif

View File

@@ -42,7 +42,7 @@
#include "precomp.hpp"
#if defined WIN32 || defined WIN64 || defined _WIN64 || defined WINCE
#if defined WIN32 || defined _WIN32 || defined WINCE
#include <tchar.h>
#if defined _MSC_VER
#if _MSC_VER >= 1400
@@ -184,7 +184,7 @@ bool useOptimized()
int64 getTickCount()
{
#if defined WIN32 || defined WIN64 || defined _WIN64 || defined WINCE
#if defined WIN32 || defined _WIN32 || defined WINCE
LARGE_INTEGER counter;
QueryPerformanceCounter( &counter );
return (int64)counter.QuadPart;
@@ -204,7 +204,7 @@ int64 getTickCount()
double getTickFrequency()
{
#if defined WIN32 || defined WIN64 || defined _WIN64 || defined WINCE
#if defined WIN32 || defined _WIN32 || defined WINCE
LARGE_INTEGER freq;
QueryPerformanceFrequency(&freq);
return (double)freq.QuadPart;
@@ -266,7 +266,7 @@ int64 getCPUTickCount(void)
#endif
#elif defined _MSC_VER && defined WIN32 && !defined _WIN64
#elif defined _MSC_VER && defined WIN32 && defined _M_IX86
int64 getCPUTickCount(void)
{
@@ -394,7 +394,7 @@ redirectError( CvErrorCallback errCallback, void* userdata, void** prevUserdata)
cvGuiBoxReport( int code, const char *func_name, const char *err_msg,
const char *file, int line, void* )
{
#if (!defined WIN32 && !defined WIN64) || defined WINCE
#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 )