mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 14:36:36 +08:00
Merge pull request #7170 from alalek:fix_build
This commit is contained in:
commit
4e8f8922e2
@ -521,7 +521,7 @@ int cv::getNumberOfCPUs(void)
|
|||||||
{
|
{
|
||||||
#if defined WIN32 || defined _WIN32
|
#if defined WIN32 || defined _WIN32
|
||||||
SYSTEM_INFO sysinfo;
|
SYSTEM_INFO sysinfo;
|
||||||
#if defined(_M_ARM) || defined(_M_X64) || defined(WINRT)
|
#if (defined(_M_ARM) || defined(_M_X64) || defined(WINRT)) && _WIN32_WINNT >= 0x501
|
||||||
GetNativeSystemInfo( &sysinfo );
|
GetNativeSystemInfo( &sysinfo );
|
||||||
#else
|
#else
|
||||||
GetSystemInfo( &sysinfo );
|
GetSystemInfo( &sysinfo );
|
||||||
|
@ -63,14 +63,6 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#if defined WIN32 || defined WINCE
|
#if defined WIN32 || defined WINCE
|
||||||
#if !defined _WIN32_WINNT
|
|
||||||
#ifdef HAVE_MSMF
|
|
||||||
#define _WIN32_WINNT 0x0600 // Windows Vista
|
|
||||||
#else
|
|
||||||
#define _WIN32_WINNT 0x0500 // Windows 2000
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#undef small
|
#undef small
|
||||||
#undef min
|
#undef min
|
||||||
|
@ -59,14 +59,6 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#if defined WIN32 || defined WINCE
|
#if defined WIN32 || defined WINCE
|
||||||
#if !defined _WIN32_WINNT
|
|
||||||
#ifdef HAVE_MSMF
|
|
||||||
#define _WIN32_WINNT 0x0600 // Windows Vista
|
|
||||||
#else
|
|
||||||
#define _WIN32_WINNT 0x0500 // Windows 2000
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#undef small
|
#undef small
|
||||||
#undef min
|
#undef min
|
||||||
|
@ -65,9 +65,11 @@ static cv::Mutex _icvInitFFMPEG_mutex;
|
|||||||
static const HMODULE cv_GetCurrentModule()
|
static const HMODULE cv_GetCurrentModule()
|
||||||
{
|
{
|
||||||
HMODULE h = 0;
|
HMODULE h = 0;
|
||||||
|
#if _WIN32_WINNT >= 0x0501
|
||||||
::GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
|
::GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
|
||||||
reinterpret_cast<LPCTSTR>(cv_GetCurrentModule),
|
reinterpret_cast<LPCTSTR>(cv_GetCurrentModule),
|
||||||
&h);
|
&h);
|
||||||
|
#endif
|
||||||
return h;
|
return h;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -98,22 +100,16 @@ private:
|
|||||||
icvInitFFMPEG()
|
icvInitFFMPEG()
|
||||||
{
|
{
|
||||||
#if defined WIN32 || defined _WIN32
|
#if defined WIN32 || defined _WIN32
|
||||||
|
const wchar_t* module_name_ = L"opencv_ffmpeg"
|
||||||
|
CVAUX_STRW(CV_MAJOR_VERSION) CVAUX_STRW(CV_MINOR_VERSION) CVAUX_STRW(CV_SUBMINOR_VERSION)
|
||||||
|
#if (defined _MSC_VER && defined _M_X64) || (defined __GNUC__ && defined __x86_64__)
|
||||||
|
L"_64"
|
||||||
|
#endif
|
||||||
|
L".dll";
|
||||||
# ifdef WINRT
|
# ifdef WINRT
|
||||||
const wchar_t* module_name = L"opencv_ffmpeg"
|
icvFFOpenCV = LoadPackagedLibrary( module_name_, 0 );
|
||||||
CVAUX_STRW(CV_MAJOR_VERSION) CVAUX_STRW(CV_MINOR_VERSION) CVAUX_STRW(CV_SUBMINOR_VERSION)
|
|
||||||
#if (defined _MSC_VER && defined _M_X64) || (defined __GNUC__ && defined __x86_64__)
|
|
||||||
L"_64"
|
|
||||||
#endif
|
|
||||||
L".dll";
|
|
||||||
|
|
||||||
icvFFOpenCV = LoadPackagedLibrary( module_name, 0 );
|
|
||||||
# else
|
# else
|
||||||
const std::wstring module_name = L"opencv_ffmpeg"
|
const std::wstring module_name(module_name_);
|
||||||
CVAUX_STRW(CV_MAJOR_VERSION) CVAUX_STRW(CV_MINOR_VERSION) CVAUX_STRW(CV_SUBMINOR_VERSION)
|
|
||||||
#if (defined _MSC_VER && defined _M_X64) || (defined __GNUC__ && defined __x86_64__)
|
|
||||||
L"_64"
|
|
||||||
#endif
|
|
||||||
L".dll";
|
|
||||||
|
|
||||||
const wchar_t* ffmpeg_env_path = _wgetenv(L"OPENCV_FFMPEG_DLL_DIR");
|
const wchar_t* ffmpeg_env_path = _wgetenv(L"OPENCV_FFMPEG_DLL_DIR");
|
||||||
std::wstring module_path =
|
std::wstring module_path =
|
||||||
|
@ -66,7 +66,7 @@
|
|||||||
#ifdef HAVE_MSMF
|
#ifdef HAVE_MSMF
|
||||||
#define _WIN32_WINNT 0x0600 // Windows Vista
|
#define _WIN32_WINNT 0x0600 // Windows Vista
|
||||||
#else
|
#else
|
||||||
#define _WIN32_WINNT 0x0500 // Windows 2000
|
#define _WIN32_WINNT 0x0501 // Windows XP
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user