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:
@@ -298,9 +298,15 @@ if(WIN32)
|
||||
|
||||
if(MINGW)
|
||||
if(MINGW64)
|
||||
target_link_libraries(${the_target} msvfw32 avifil32 avicap32 winmm videoInput64 strmiids)
|
||||
target_link_libraries(${the_target} msvfw32 avifil32 avicap32 winmm)
|
||||
if(HAVE_VIDEOINPUT)
|
||||
target_link_libraries(${the_target} videoInput64 strmiids)
|
||||
endif()
|
||||
else()
|
||||
target_link_libraries(${the_target} vfw32 winmm videoInput strmiids)
|
||||
target_link_libraries(${the_target} vfw32 winmm)
|
||||
if(HAVE_VIDEOINPUT)
|
||||
target_link_libraries(${the_target} videoInput strmiids)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
#define __OPENCV_HIGHGUI_H__
|
||||
|
||||
#include "opencv2/core/core_c.h"
|
||||
#if defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64
|
||||
#if defined WIN32 || defined _WIN32
|
||||
#include <windows.h>
|
||||
#undef min
|
||||
#undef max
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#pragma warning( disable: 4711 )
|
||||
#endif
|
||||
|
||||
#if (defined WIN64 || defined _WIN64) && defined _MSC_VER && !defined __ICL
|
||||
#if defined _M_X64 && defined _MSC_VER && !defined CV_ICC
|
||||
#pragma optimize("",off)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -41,7 +41,8 @@
|
||||
|
||||
#include "precomp.hpp"
|
||||
|
||||
#ifdef HAVE_VIDEOINPUT
|
||||
#if defined HAVE_VIDEOINPUT && (_MSC_VER >= 1400 || defined __GNUC__)
|
||||
|
||||
#include "videoinput.h"
|
||||
|
||||
/********************* Capturing video from camera via VFW *********************/
|
||||
@@ -183,7 +184,11 @@ CvCapture* cvCreateCameraCapture_DShow( int index )
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#if defined _M_X64
|
||||
#pragma comment(lib, "videoInput64.lib")
|
||||
#else
|
||||
#pragma comment(lib, "videoInput.lib")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
#pragma comment(lib,"milmet2.lib")
|
||||
#endif
|
||||
|
||||
#if defined WIN64 && defined EM64T && defined _MSC_VER && !defined __ICL
|
||||
#if defined _M_X64
|
||||
#pragma optimize("",off)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -50,9 +50,9 @@
|
||||
#define _LINUX
|
||||
#endif
|
||||
|
||||
#if defined(_x64) || defined (__x86_64) || defined (_WIN64)
|
||||
#if defined(_x64) || defined (__x86_64) || defined (_M_X64)
|
||||
#define _x64 1
|
||||
#elif defined(_x86) || defined(__i386) || defined (_WIN32)
|
||||
#elif defined(_x86) || defined(__i386) || defined (_M_IX86)
|
||||
#define _x86 1
|
||||
#endif
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
#define capSendMessage(hwnd,m,w,l) (IsWindow(hwnd)?SendMessage(hwnd,m,w,l):0)
|
||||
#endif
|
||||
|
||||
#if (defined WIN64 || defined _WIN64) && defined _MSC_VER && !defined __ICL
|
||||
#if defined _M_X64
|
||||
#pragma optimize("",off)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -103,13 +103,6 @@ struct CvVideoWriter
|
||||
#if defined WIN32 || defined _WIN32
|
||||
#define HAVE_VFW 1
|
||||
|
||||
#if (_MSC_VER >= 1400 || defined __GNUC__) && !defined WIN64 && !defined _WIN64
|
||||
#define HAVE_VIDEOINPUT 1
|
||||
#endif
|
||||
|
||||
/* uncomment to enable OpenEXR codec (will not compile under MSVC6) */
|
||||
//#define HAVE_OPENEXR 1
|
||||
|
||||
/* uncomment to enable CMUCamera1394 fireware camera module */
|
||||
//#define HAVE_CMU1394 1
|
||||
#endif
|
||||
|
||||
@@ -262,7 +262,7 @@ CV_IMPL int cvWaitKey( int arg )
|
||||
waitCondition.wait(&dummy, 2);
|
||||
*/
|
||||
|
||||
#if defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64
|
||||
#if defined WIN32 || defined _WIN32
|
||||
sleep(2);
|
||||
#else
|
||||
usleep(2);//to decrease CPU usage
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
#include "precomp.hpp"
|
||||
|
||||
#if defined WIN32 || defined WIN64 || defined _WIN64
|
||||
#if defined WIN32 || defined _WIN32
|
||||
|
||||
#if _MSC_VER >= 1200
|
||||
#pragma warning( disable: 4710 )
|
||||
@@ -57,7 +57,7 @@
|
||||
static const char* trackbar_text =
|
||||
" ";
|
||||
|
||||
#if defined WIN64 || defined _WIN64
|
||||
#if defined _M_X64 || defined __x86_64
|
||||
|
||||
#define icvGetWindowLongPtr GetWindowLongPtr
|
||||
#define icvSetWindowLongPtr( hwnd, id, ptr ) SetWindowLongPtr( hwnd, id, (LONG_PTR)(ptr) )
|
||||
|
||||
Reference in New Issue
Block a user