WinRT build fix for samples and static libs.
This commit is contained in:
parent
b0854c605a
commit
91c519467d
@ -8,10 +8,5 @@ add_definitions(-D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE)
|
||||
set(CMAKE_CXX_FLAGS "" CACHE STRING "c++ flags")
|
||||
set(CMAKE_C_FLAGS "" CACHE STRING "c flags")
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ZW -EHsc -GS")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -GS")
|
||||
|
||||
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "/r:System.Runtime.WindowsRuntime.dll /r:System.Threading.Tasks.dll" CACHE STRING "shared linker flags")
|
||||
set(CMAKE_MODULE_LINKER_FLAGS "/r:System.Runtime.WindowsRuntime.dll /r:System.Threading.Tasks.dll" CACHE STRING "module linker flags")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "/r:System.Runtime.WindowsRuntime.dll /r:System.Threading.Tasks.dll" CACHE STRING "executable linker flags")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -EHsc -GS")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -GS")
|
@ -3,7 +3,7 @@
|
||||
#include "opencv2/highgui/highgui.hpp"
|
||||
#include "opencv2/contrib/contrib.hpp"
|
||||
|
||||
#ifdef WIN32
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
#include <io.h>
|
||||
#else
|
||||
#include <dirent.h>
|
||||
@ -67,7 +67,7 @@ static void readDirectory( const string& directoryName, vector<string>& filename
|
||||
{
|
||||
filenames.clear();
|
||||
|
||||
#ifdef WIN32
|
||||
#if defined(WIN32) | defined(_WIN32)
|
||||
struct _finddata_t s_file;
|
||||
string str = directoryName + "\\*.*";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user