Warning and review notes fixes.
WITH_WINRT -> ENABLE_WINRT_MODE; Some temporary char* replaced with Ptr<char>; Build fix for regular WIN32; Windows Platform SDK and MSVC search added to cmake; Warinig fixes.
This commit is contained in:
parent
e03ffde346
commit
63786c389f
@ -147,7 +147,6 @@ OCV_OPTION(WITH_PVAPI "Include Prosilica GigE support" ON
|
|||||||
OCV_OPTION(WITH_GIGEAPI "Include Smartek 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_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_WIN32UI "Build with Win32 UI Backend support" ON IF WIN32 )
|
||||||
OCV_OPTION(WITH_WINRT "Build with Windows Runtime support" OFF IF WIN32 )
|
|
||||||
OCV_OPTION(WITH_QUICKTIME "Use QuickTime for Video I/O insted of QTKit" OFF IF APPLE )
|
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) )
|
||||||
OCV_OPTION(WITH_CSTRIPES "Include C= support" OFF IF WIN32 )
|
OCV_OPTION(WITH_CSTRIPES "Include C= support" OFF IF WIN32 )
|
||||||
@ -213,7 +212,7 @@ OCV_OPTION(ENABLE_SSE42 "Enable SSE4.2 instructions"
|
|||||||
OCV_OPTION(ENABLE_AVX "Enable AVX instructions" OFF IF ((MSVC OR CMAKE_COMPILER_IS_GNUCXX) AND (X86 OR X86_64)) )
|
OCV_OPTION(ENABLE_AVX "Enable AVX instructions" OFF IF ((MSVC OR CMAKE_COMPILER_IS_GNUCXX) AND (X86 OR X86_64)) )
|
||||||
OCV_OPTION(ENABLE_NOISY_WARNINGS "Show all warnings even if they are too noisy" OFF )
|
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(OPENCV_WARNINGS_ARE_ERRORS "Treat warnings as errors" OFF )
|
||||||
|
OCV_OPTION(ENABLE_WINRT_MODE "Build with Windows Runtime support" OFF IF WIN32 )
|
||||||
|
|
||||||
# uncategorized options
|
# uncategorized options
|
||||||
# ===================================================
|
# ===================================================
|
||||||
@ -604,6 +603,16 @@ if(ANDROID)
|
|||||||
status(" Android examples:" BUILD_ANDROID_EXAMPLES AND CAN_BUILD_ANDROID_PROJECTS THEN YES ELSE NO)
|
status(" Android examples:" BUILD_ANDROID_EXAMPLES AND CAN_BUILD_ANDROID_PROJECTS THEN YES ELSE NO)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# ================== Windows RT features ==================
|
||||||
|
if(WIN32)
|
||||||
|
status("")
|
||||||
|
status(" Windows RT support:" HAVE_WINRT THEN YES ELSE NO)
|
||||||
|
if (ENABLE_WINRT_MODE)
|
||||||
|
status(" Windows SDK v8.0:" ${WINDOWS_SDK_PATH})
|
||||||
|
status(" Visual Studio 2012:" ${VISUAL_STUDIO_PATH})
|
||||||
|
endif()
|
||||||
|
endif(WIN32)
|
||||||
|
|
||||||
# ========================== GUI ==========================
|
# ========================== GUI ==========================
|
||||||
status("")
|
status("")
|
||||||
status(" GUI: ")
|
status(" GUI: ")
|
||||||
|
@ -4,18 +4,37 @@ endif()
|
|||||||
|
|
||||||
#INCLUDE (CheckIncludeFiles)
|
#INCLUDE (CheckIncludeFiles)
|
||||||
|
|
||||||
if (WITH_WINRT)
|
if (ENABLE_WINRT_MODE)
|
||||||
#CHECK_INCLUDE_FILES("wrl/client.h" HAVE_WINRT)
|
set(HAVE_WINRT True)
|
||||||
TRY_COMPILE(HAVE_WINRT
|
|
||||||
"${OPENCV_BINARY_DIR}/CMakeFiles/CMakeTmp"
|
# search Windows Platform SDK
|
||||||
"${OpenCV_SOURCE_DIR}/cmake/checks/winrttest.cpp"
|
message(STATUS "Checking for Windows Platfrom SDK")
|
||||||
CMAKE_FLAGS "\"kernel.lib\" \"user32.lib\""
|
GET_FILENAME_COMPONENT(WINDOWS_SDK_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v8.0;InstallationFolder]" ABSOLUTE CACHE)
|
||||||
OUTPUT_VARIABLE OUTPUT)
|
if (WINDOWS_SDK_PATH STREQUAL "")
|
||||||
|
message(ERROR "Windows Platform SDK 8.0 was not found!")
|
||||||
|
set(HAVE_WINRT False)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
#search for Visual Studio 11.0 install directory
|
||||||
|
message(STATUS "Checking for Visual Studio 2012")
|
||||||
|
GET_FILENAME_COMPONENT(VISUAL_STUDIO_PATH [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0\\Setup\\VS;ProductDir] REALPATH CACHE)
|
||||||
|
if (VISUAL_STUDIO_PATH STREQUAL "")
|
||||||
|
message(ERROR "Visual Studio 2012 was not found!")
|
||||||
|
set(HAVE_WINRT False)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (HAVE_WINRT)
|
||||||
|
TRY_COMPILE(HAVE_WINRT
|
||||||
|
"${OPENCV_BINARY_DIR}/CMakeFiles/CMakeTmp"
|
||||||
|
"${OpenCV_SOURCE_DIR}/cmake/checks/winrttest.cpp"
|
||||||
|
CMAKE_FLAGS "\"kernel.lib\" \"user32.lib\""
|
||||||
|
OUTPUT_VARIABLE OUTPUT)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (HAVE_WINRT)
|
if (HAVE_WINRT)
|
||||||
add_definitions(/DWINVER=0x0602 /DNTDDI_VERSION=NTDDI_WIN8 /D_WIN32_WINNT=0x0602)
|
add_definitions(/DWINVER=0x0602 /DNTDDI_VERSION=NTDDI_WIN8 /D_WIN32_WINNT=0x0602)
|
||||||
endif()
|
endif()
|
||||||
message(STATUS "Windows RT: ${HAVE_WINRT}")
|
endif(ENABLE_WINRT_MODE)
|
||||||
endif(WITH_WINRT)
|
|
||||||
|
|
||||||
if(NOT BUILD_SHARED_LIBS AND BUILD_WITH_STATIC_CRT)
|
if(NOT BUILD_SHARED_LIBS AND BUILD_WITH_STATIC_CRT)
|
||||||
foreach(flag_var
|
foreach(flag_var
|
||||||
|
6
cmake/checks/winrttest.cpp
Normal file
6
cmake/checks/winrttest.cpp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#include <wrl/client.h>
|
||||||
|
|
||||||
|
int main(int, char**)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
@ -20,17 +20,16 @@ namespace cv
|
|||||||
#ifdef HAVE_WINRT
|
#ifdef HAVE_WINRT
|
||||||
WIN32_FIND_DATAW FindFileData;
|
WIN32_FIND_DATAW FindFileData;
|
||||||
#else
|
#else
|
||||||
WIN32_FIND_DATA FindFileData;
|
WIN32_FIND_DATAA FindFileData;
|
||||||
#endif
|
#endif
|
||||||
HANDLE hFind;
|
HANDLE hFind;
|
||||||
|
|
||||||
#ifdef HAVE_WINRT
|
#ifdef HAVE_WINRT
|
||||||
size_t size = mbstowcs(NULL, path_f.c_str(), path_f.size());
|
size_t size = mbstowcs(NULL, path_f.c_str(), path_f.size());
|
||||||
wchar_t* wpath = (wchar_t*)malloc((size+1)*sizeof(wchar_t));
|
Ptr<wchar_t> wpath = new wchar_t[size+1];
|
||||||
wpath[size] = 0;
|
wpath[size] = 0;
|
||||||
mbstowcs(wpath, path_f.c_str(), path_f.size());
|
mbstowcs(wpath, path_f.c_str(), path_f.size());
|
||||||
hFind = FindFirstFileExW(wpath, FindExInfoStandard, &FindFileData, FindExSearchNameMatch, NULL, 0);
|
hFind = FindFirstFileExW(wpath, FindExInfoStandard, &FindFileData, FindExSearchNameMatch, NULL, 0);
|
||||||
free(wpath);
|
|
||||||
#else
|
#else
|
||||||
hFind = FindFirstFileA((LPCSTR)path_f.c_str(), &FindFileData);
|
hFind = FindFirstFileA((LPCSTR)path_f.c_str(), &FindFileData);
|
||||||
#endif
|
#endif
|
||||||
@ -48,22 +47,19 @@ namespace cv
|
|||||||
FindFileData.dwFileAttributes == FILE_ATTRIBUTE_SYSTEM ||
|
FindFileData.dwFileAttributes == FILE_ATTRIBUTE_SYSTEM ||
|
||||||
FindFileData.dwFileAttributes == FILE_ATTRIBUTE_READONLY)
|
FindFileData.dwFileAttributes == FILE_ATTRIBUTE_READONLY)
|
||||||
{
|
{
|
||||||
char* fname;
|
cv::Ptr<char> fname;
|
||||||
#ifdef HAVE_WINRT
|
#ifdef HAVE_WINRT
|
||||||
size_t asize = wcstombs(NULL, FindFileData.cFileName, 0);
|
size_t asize = wcstombs(NULL, FindFileData.cFileName, 0);
|
||||||
fname = (char*)malloc((asize+1)*sizeof(char));
|
fname = new char[asize+1];
|
||||||
fname[asize] = 0;
|
fname[asize] = 0;
|
||||||
wcstombs(fname, FindFileData.cFileName, asize);
|
wcstombs(fname, FindFileData.cFileName, asize);
|
||||||
#else
|
#else
|
||||||
fname = FindFileData.cFileName;
|
fname = FindFileData.cFileName;
|
||||||
#endif
|
#endif
|
||||||
if (addPath)
|
if (addPath)
|
||||||
list.push_back(path + "/" + fname);
|
list.push_back(path + "/" + std::string(fname));
|
||||||
else
|
else
|
||||||
list.push_back(fname);
|
list.push_back(std::string(fname));
|
||||||
#ifdef HAVE_WINRT
|
|
||||||
free(fname);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef HAVE_WINRT
|
#ifdef HAVE_WINRT
|
||||||
@ -108,17 +104,16 @@ namespace cv
|
|||||||
#ifdef HAVE_WINRT
|
#ifdef HAVE_WINRT
|
||||||
WIN32_FIND_DATAW FindFileData;
|
WIN32_FIND_DATAW FindFileData;
|
||||||
#else
|
#else
|
||||||
WIN32_FIND_DATA FindFileData;
|
WIN32_FIND_DATAA FindFileData;
|
||||||
#endif
|
#endif
|
||||||
HANDLE hFind;
|
HANDLE hFind;
|
||||||
|
|
||||||
#ifdef HAVE_WINRT
|
#ifdef HAVE_WINRT
|
||||||
size_t size = mbstowcs(NULL, path_f.c_str(), path_f.size());
|
size_t size = mbstowcs(NULL, path_f.c_str(), path_f.size());
|
||||||
wchar_t* wpath = (wchar_t*)malloc((size+1)*sizeof(wchar_t));
|
Ptr<wchar_t> wpath = new wchar_t[size+1];
|
||||||
wpath[size] = 0;
|
wpath[size] = 0;
|
||||||
mbstowcs(wpath, path_f.c_str(), path_f.size());
|
mbstowcs(wpath, path_f.c_str(), path_f.size());
|
||||||
hFind = FindFirstFileExW(wpath, FindExInfoStandard, &FindFileData, FindExSearchNameMatch, NULL, 0);
|
hFind = FindFirstFileExW(wpath, FindExInfoStandard, &FindFileData, FindExSearchNameMatch, NULL, 0);
|
||||||
free(wpath);
|
|
||||||
#else
|
#else
|
||||||
hFind = FindFirstFileA((LPCSTR)path_f.c_str(), &FindFileData);
|
hFind = FindFirstFileA((LPCSTR)path_f.c_str(), &FindFileData);
|
||||||
#endif
|
#endif
|
||||||
@ -130,14 +125,20 @@ namespace cv
|
|||||||
{
|
{
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_WINRT
|
||||||
if (FindFileData.dwFileAttributes == FILE_ATTRIBUTE_DIRECTORY &&
|
if (FindFileData.dwFileAttributes == FILE_ATTRIBUTE_DIRECTORY &&
|
||||||
wcscmp(FindFileData.cFileName, L".") != 0 &&
|
wcscmp(FindFileData.cFileName, L".") != 0 &&
|
||||||
wcscmp(FindFileData.cFileName, L"..") != 0)
|
wcscmp(FindFileData.cFileName, L"..") != 0)
|
||||||
|
#else
|
||||||
|
if (FindFileData.dwFileAttributes == FILE_ATTRIBUTE_DIRECTORY &&
|
||||||
|
strcmp(FindFileData.cFileName, ".") != 0 &&
|
||||||
|
strcmp(FindFileData.cFileName, "..") != 0)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
char* fname;
|
cv::Ptr<char> fname;
|
||||||
#ifdef HAVE_WINRT
|
#ifdef HAVE_WINRT
|
||||||
size_t asize = wcstombs(NULL, FindFileData.cFileName, 0);
|
size_t asize = wcstombs(NULL, FindFileData.cFileName, 0);
|
||||||
fname = (char*)malloc((asize+1)*sizeof(char));
|
fname = new char[asize+1];
|
||||||
fname[asize] = 0;
|
fname[asize] = 0;
|
||||||
wcstombs(fname, FindFileData.cFileName, asize);
|
wcstombs(fname, FindFileData.cFileName, asize);
|
||||||
#else
|
#else
|
||||||
@ -145,9 +146,9 @@ namespace cv
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (addPath)
|
if (addPath)
|
||||||
list.push_back(path + "/" + fname);
|
list.push_back(path + "/" + std::string(fname));
|
||||||
else
|
else
|
||||||
list.push_back(fname);
|
list.push_back(std::string(fname));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef HAVE_WINRT
|
#ifdef HAVE_WINRT
|
||||||
|
@ -3,7 +3,7 @@ ocv_add_module(core ${ZLIB_LIBRARIES})
|
|||||||
ocv_module_include_directories(${ZLIB_INCLUDE_DIR})
|
ocv_module_include_directories(${ZLIB_INCLUDE_DIR})
|
||||||
|
|
||||||
if (HAVE_WINRT)
|
if (HAVE_WINRT)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /ZW /GS /Gm- /AI\"C:/Program Files/Windows Kits/8.0/References/CommonConfiguration/Neutral\" /AI\"C:/Program Files/Microsoft Visual Studio 11.0/VC/vcpackages\"")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /ZW /GS /Gm- /AI\"${WINDOWS_SDK_PATH}/References/CommonConfiguration/Neutral\" /AI\"${VISUAL_STUDIO_PATH}/vcpackages\"")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(HAVE_CUDA)
|
if(HAVE_CUDA)
|
||||||
|
@ -68,7 +68,7 @@ namespace
|
|||||||
~DIR()
|
~DIR()
|
||||||
{
|
{
|
||||||
if (ent.d_name)
|
if (ent.d_name)
|
||||||
free((void*)ent.d_name);
|
delete[] ent.d_name;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
@ -80,12 +80,11 @@ namespace
|
|||||||
#ifdef HAVE_WINRT
|
#ifdef HAVE_WINRT
|
||||||
cv::String full_path = cv::String(path) + "\\*";
|
cv::String full_path = cv::String(path) + "\\*";
|
||||||
size_t size = mbstowcs(NULL, full_path.c_str(), full_path.size());
|
size_t size = mbstowcs(NULL, full_path.c_str(), full_path.size());
|
||||||
wchar_t* wfull_path = (wchar_t*)malloc((size+1)*sizeof(wchar_t));
|
cv::Ptr<wchar_t> wfull_path = new wchar_t[size+1];
|
||||||
wfull_path[size] = 0;
|
wfull_path[size] = 0;
|
||||||
mbstowcs(wfull_path, full_path.c_str(), full_path.size());
|
mbstowcs(wfull_path, full_path.c_str(), full_path.size());
|
||||||
dir->handle = ::FindFirstFileExW(wfull_path, FindExInfoStandard,
|
dir->handle = ::FindFirstFileExW(wfull_path, FindExInfoStandard,
|
||||||
&dir->data, FindExSearchNameMatch, NULL, 0);
|
&dir->data, FindExSearchNameMatch, NULL, 0);
|
||||||
free(wfull_path);
|
|
||||||
#else
|
#else
|
||||||
dir->handle = ::FindFirstFileExA((cv::String(path) + "\\*").c_str(),
|
dir->handle = ::FindFirstFileExA((cv::String(path) + "\\*").c_str(),
|
||||||
FindExInfoStandard, &dir->data, FindExSearchNameMatch, NULL, 0);
|
FindExInfoStandard, &dir->data, FindExSearchNameMatch, NULL, 0);
|
||||||
@ -107,7 +106,7 @@ namespace
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
size_t asize = wcstombs(NULL, dir->data.cFileName, 0);
|
size_t asize = wcstombs(NULL, dir->data.cFileName, 0);
|
||||||
char* aname = (char*)malloc((asize+1)*sizeof(char));
|
char* aname = new char[asize+1];
|
||||||
aname[asize] = 0;
|
aname[asize] = 0;
|
||||||
wcstombs(aname, dir->data.cFileName, asize);
|
wcstombs(aname, dir->data.cFileName, asize);
|
||||||
dir->ent.d_name = aname;
|
dir->ent.d_name = aname;
|
||||||
@ -148,11 +147,10 @@ static bool isDir(const cv::String& path, DIR* dir)
|
|||||||
WIN32_FILE_ATTRIBUTE_DATA all_attrs;
|
WIN32_FILE_ATTRIBUTE_DATA all_attrs;
|
||||||
#ifdef HAVE_WINRT
|
#ifdef HAVE_WINRT
|
||||||
size_t size = mbstowcs(NULL, path.c_str(), path.size());
|
size_t size = mbstowcs(NULL, path.c_str(), path.size());
|
||||||
wchar_t* wpath = (wchar_t*)malloc((size+1)*sizeof(wchar_t));
|
cv::Ptr<wchar_t> wpath = new wchar_t[size+1];
|
||||||
wpath[size] = 0;
|
wpath[size] = 0;
|
||||||
mbstowcs(wpath, path.c_str(), path.size());
|
mbstowcs(wpath, path.c_str(), path.size());
|
||||||
::GetFileAttributesExW(wpath, GetFileExInfoStandard, &all_attrs);
|
::GetFileAttributesExW(wpath, GetFileExInfoStandard, &all_attrs);
|
||||||
free(wpath);
|
|
||||||
#else
|
#else
|
||||||
::GetFileAttributesExA(path.c_str(), GetFileExInfoStandard, &all_attrs);
|
::GetFileAttributesExA(path.c_str(), GetFileExInfoStandard, &all_attrs);
|
||||||
#endif
|
#endif
|
||||||
|
@ -89,15 +89,14 @@ std::wstring GetTempPathWinRT()
|
|||||||
|
|
||||||
std::wstring GetTempFileNameWinRT(std::wstring prefix)
|
std::wstring GetTempFileNameWinRT(std::wstring prefix)
|
||||||
{
|
{
|
||||||
wchar_t guidStr[120];
|
wchar_t guidStr[40];
|
||||||
GUID* g = 0x00;
|
GUID g;
|
||||||
g = new GUID;
|
CoCreateGuid(&g);
|
||||||
CoCreateGuid(g);
|
|
||||||
wchar_t* mask = L"%08x_%04x_%04x_%02x%02x_%02x%02x%02x%02x%02x%02x";
|
wchar_t* mask = L"%08x_%04x_%04x_%02x%02x_%02x%02x%02x%02x%02x%02x";
|
||||||
swprintf(&guidStr[0],mask, 120, g->Data1,g->Data2,g->Data3,UINT(g->Data4[0]),
|
swprintf(&guidStr[0], sizeof(guidStr)/sizeof(wchar_t), mask,
|
||||||
UINT(g->Data4[1]),UINT(g->Data4[2]),UINT(g->Data4[3]),UINT(g->Data4[4]),
|
g.Data1, g.Data2, g.Data3, UINT(g.Data4[0]), UINT(g.Data4[1]),
|
||||||
UINT(g->Data4[5]),UINT(g->Data4[6]),UINT(g->Data4[7]));
|
UINT(g.Data4[2]), UINT(g.Data4[3]), UINT(g.Data4[4]),
|
||||||
delete g;
|
UINT(g.Data4[5]), UINT(g.Data4[6]), UINT(g.Data4[7]));
|
||||||
|
|
||||||
return prefix + std::wstring(guidStr);
|
return prefix + std::wstring(guidStr);
|
||||||
}
|
}
|
||||||
@ -389,7 +388,7 @@ string tempfile( const char* suffix )
|
|||||||
{
|
{
|
||||||
#ifdef HAVE_WINRT
|
#ifdef HAVE_WINRT
|
||||||
std::wstring temp_dir = L"";
|
std::wstring temp_dir = L"";
|
||||||
wchar_t* opencv_temp_dir = _wgetenv(L"OPENCV_TEMP_PATH");
|
const wchar_t* opencv_temp_dir = _wgetenv(L"OPENCV_TEMP_PATH");
|
||||||
if (opencv_temp_dir)
|
if (opencv_temp_dir)
|
||||||
temp_dir = std::wstring(opencv_temp_dir);
|
temp_dir = std::wstring(opencv_temp_dir);
|
||||||
#else
|
#else
|
||||||
@ -413,11 +412,10 @@ string tempfile( const char* suffix )
|
|||||||
DeleteFileW(temp_file.c_str());
|
DeleteFileW(temp_file.c_str());
|
||||||
|
|
||||||
size_t asize = wcstombs(NULL, temp_file.c_str(), 0);
|
size_t asize = wcstombs(NULL, temp_file.c_str(), 0);
|
||||||
char* aname = (char*)malloc((asize+1)*sizeof(char));
|
Ptr<char> aname = new char[asize+1];
|
||||||
aname[asize] = 0;
|
aname[asize] = 0;
|
||||||
wcstombs(aname, temp_file.c_str(), asize);
|
wcstombs(aname, temp_file.c_str(), asize);
|
||||||
fname = std::string(aname);
|
fname = std::string(aname);
|
||||||
free(aname);
|
|
||||||
RoUninitialize();
|
RoUninitialize();
|
||||||
#else
|
#else
|
||||||
char temp_dir2[MAX_PATH + 1] = { 0 };
|
char temp_dir2[MAX_PATH + 1] = { 0 };
|
||||||
@ -804,6 +802,10 @@ cvGetModuleInfo( const char* name, const char **version, const char **plugin_lis
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined CVAPI_EXPORTS && defined WIN32 && !defined WINCE
|
#if defined CVAPI_EXPORTS && defined WIN32 && !defined WINCE
|
||||||
|
#ifdef HAVE_WINRT
|
||||||
|
#pragma warning(disable:4447) // Disable warning 'main' signature found without threading model
|
||||||
|
#endif
|
||||||
|
|
||||||
BOOL WINAPI DllMain( HINSTANCE, DWORD fdwReason, LPVOID );
|
BOOL WINAPI DllMain( HINSTANCE, DWORD fdwReason, LPVOID );
|
||||||
|
|
||||||
BOOL WINAPI DllMain( HINSTANCE, DWORD fdwReason, LPVOID )
|
BOOL WINAPI DllMain( HINSTANCE, DWORD fdwReason, LPVOID )
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
#ifdef HAVE_WINRT
|
||||||
|
#pragma warning(disable:4447) // Disable warning 'main' signature found without threading model
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "test_precomp.hpp"
|
#include "test_precomp.hpp"
|
||||||
|
|
||||||
CV_TEST_MAIN("cv")
|
CV_TEST_MAIN("cv")
|
||||||
|
@ -10,6 +10,10 @@
|
|||||||
|
|
||||||
#include <stdarg.h> // for va_list
|
#include <stdarg.h> // for va_list
|
||||||
|
|
||||||
|
#ifdef HAVE_WINRT
|
||||||
|
#pragma warning(disable:4447) // Disable warning 'main' signature found without threading model
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#pragma warning( disable: 4127 )
|
#pragma warning( disable: 4127 )
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user