[opencv] Further fixes

This commit is contained in:
Robert Schumacher 2017-04-19 04:30:08 -07:00
parent efba9e6a23
commit e1d41a365a
4 changed files with 44 additions and 4 deletions

View File

@ -6,7 +6,7 @@ index 0dcf7ed..c722a03 100644
string(REPLACE "/EHsc" "/EHa" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" CACHE STRING "Flags used by the compiler during all build types." FORCE)
endif()
+ if(${CMAKE_SYSTEM_NAME} STREQUAL "WindowsStore")
+ if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /ZW")
+ endif()
endif()

View File

@ -0,0 +1,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)
{

View File

@ -1,4 +1,4 @@
Source: opencv
Version: 3.2.0
Version: 3.2.0-1
Build-Depends: zlib, libpng, libjpeg-turbo, tiff
Description: computer vision library

View File

@ -14,7 +14,8 @@ vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES "${CMAKE_CURRENT_LIST_DIR}/opencv-installation-options.patch"
PATCHES "${CMAKE_CURRENT_LIST_DIR}/001-fix-uwp.patch"
"${CMAKE_CURRENT_LIST_DIR}/001-fix-uwp.patch"
"${CMAKE_CURRENT_LIST_DIR}/002-fix-uwp.patch"
)
file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty/libjpeg ${SOURCE_PATH}/3rdparty/libpng ${SOURCE_PATH}/3rdparty/zlib ${SOURCE_PATH}/3rdparty/libtiff)