Commit 91c51946 authored by Alexander Smorkalov's avatar Alexander Smorkalov

WinRT build fix for samples and static libs.

parent b0854c60
......@@ -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_CXX_FLAGS "${CMAKE_CXX_FLAGS} -EHsc -GS")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -GS")
\ No newline at end of file
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")
\ No newline at end of file
......@@ -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 + "\\*.*";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment