aboutsummaryrefslogtreecommitdiff
path: root/ports/opencv/002-fix-uwp.patch
blob: d684141f523b37a1254902b34847ddbec883e38c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b4265bd..f1621e0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -271,7 +271,7 @@ OCV_OPTION(INSTALL_FORCE_UNIX_PATHS "Force unix-style installation" OFF)
 # OpenCV build options
 # ===================================================
 OCV_OPTION(ENABLE_CCACHE              "Use ccache"                                               (UNIX AND NOT IOS AND (CMAKE_GENERATOR MATCHES "Makefile" OR CMAKE_GENERATOR MATCHES "Ninja")) )
-OCV_OPTION(ENABLE_PRECOMPILED_HEADERS "Use precompiled headers"                                  ON IF (NOT IOS AND NOT CMAKE_CROSSCOMPILING) )
+OCV_OPTION(ENABLE_PRECOMPILED_HEADERS "Use precompiled headers"                                  ON IF (NOT IOS AND (MSVC OR NOT CMAKE_CROSSCOMPILING)) )
 OCV_OPTION(ENABLE_SOLUTION_FOLDERS    "Solution folder in Visual Studio or in other IDEs"        (MSVC_IDE OR CMAKE_GENERATOR MATCHES Xcode) )
 OCV_OPTION(ENABLE_PROFILING           "Enable profiling in the GCC compiler (Add flags: -g -pg)" OFF  IF CMAKE_COMPILER_IS_GNUCXX )
 OCV_OPTION(ENABLE_COVERAGE            "Enable coverage collection with  GCov"                    OFF  IF CMAKE_COMPILER_IS_GNUCXX )
diff --git a/cmake/OpenCVModule.cmake b/cmake/OpenCVModule.cmake
index c8242dd..97edd14 100644
--- a/cmake/OpenCVModule.cmake
+++ b/cmake/OpenCVModule.cmake
@@ -730,7 +730,7 @@ macro(ocv_create_module)
     set(the_module_target ${the_module})
   endif()
 
-  if(WINRT)
+  if(WINRT AND BUILD_TESTS)
     # removing APPCONTAINER from modules to run from console
     # in case of usual starting of WinRT test apps output is missing
     # so starting of console version w/o APPCONTAINER is required to get test results
diff --git a/modules/highgui/src/window.cpp b/modules/highgui/src/window.cpp
index 9306f8e..69a814e 100644
--- a/modules/highgui/src/window.cpp
+++ b/modules/highgui/src/window.cpp
@@ -209,7 +209,7 @@ int cv::waitKeyEx(int delay)
 int cv::waitKey(int delay)
 {
     int code = waitKeyEx(delay);
-#ifndef HAVE_WINRT
+#ifndef WINRT
     static int use_legacy = -1;
     if (use_legacy < 0)
     {