Skip to content

Commit

Permalink
[opencv] add support for MSVS 2017 update 5 (microsoft#2132)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mixaill authored and ras0219-msft committed Nov 4, 2017
1 parent 30f7421 commit 32d588a
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ports/opencv/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: opencv
Version: 3.3.1-6
Version: 3.3.1-7
Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf (windows)
Description: computer vision library

Expand Down
39 changes: 39 additions & 0 deletions ports/opencv/msvs-fix-2017-u5.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
From 62737c777c9314ee2e4b4e595daa830ba12765e2 Mon Sep 17 00:00:00 2001
From: Mikhail Paulyshka <[email protected]>
Date: Sat, 4 Nov 2017 23:52:37 +0300
Subject: [PATCH] cmake: add support for MSVS 2017 update 5

---
cmake/OpenCVDetectCXXCompiler.cmake | 2 +-
cmake/templates/OpenCVConfig.root-WIN32.cmake.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cmake/OpenCVDetectCXXCompiler.cmake b/cmake/OpenCVDetectCXXCompiler.cmake
index cfb613b..3874467 100644
--- a/cmake/OpenCVDetectCXXCompiler.cmake
+++ b/cmake/OpenCVDetectCXXCompiler.cmake
@@ -114,7 +114,7 @@ if(MSVC)
set(OpenCV_RUNTIME vc12)
elseif(MSVC_VERSION EQUAL 1900)
set(OpenCV_RUNTIME vc14)
- elseif(MSVC_VERSION EQUAL 1910 OR MSVC_VERSION EQUAL 1911)
+ elseif(MSVC_VERSION EQUAL 1910 OR MSVC_VERSION EQUAL 1911 OR MSVC_VERSION EQUAL 1912)
set(OpenCV_RUNTIME vc15)
else()
message(WARNING "OpenCV does not recognize MSVC_VERSION \"${MSVC_VERSION}\". Cannot set OpenCV_RUNTIME")
diff --git a/cmake/templates/OpenCVConfig.root-WIN32.cmake.in b/cmake/templates/OpenCVConfig.root-WIN32.cmake.in
index 7dc6666..846c400 100644
--- a/cmake/templates/OpenCVConfig.root-WIN32.cmake.in
+++ b/cmake/templates/OpenCVConfig.root-WIN32.cmake.in
@@ -78,7 +78,7 @@ if(MSVC)
set(OpenCV_RUNTIME vc12)
elseif(MSVC_VERSION EQUAL 1900)
set(OpenCV_RUNTIME vc14)
- elseif(MSVC_VERSION EQUAL 1910 OR MSVC_VERSION EQUAL 1911)
+ elseif(MSVC_VERSION EQUAL 1910 OR MSVC_VERSION EQUAL 1911 OR MSVC_VERSION EQUAL 1912)
set(OpenCV_RUNTIME vc15)
endif()
elseif(MINGW)
--
2.14.1.windows.1

1 change: 1 addition & 0 deletions ports/opencv/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ vcpkg_apply_patches(
"${CMAKE_CURRENT_LIST_DIR}/001-fix-uwp.patch"
"${CMAKE_CURRENT_LIST_DIR}/002-fix-uwp.patch"
"${CMAKE_CURRENT_LIST_DIR}/no-double-expand-enable-pylint.patch"
"${CMAKE_CURRENT_LIST_DIR}/msvs-fix-2017-u5.patch"
)
file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty/libjpeg ${SOURCE_PATH}/3rdparty/libpng ${SOURCE_PATH}/3rdparty/zlib ${SOURCE_PATH}/3rdparty/libtiff)

Expand Down

0 comments on commit 32d588a

Please sign in to comment.