Skip to content

Commit ec16307

Browse files
authored
Merge pull request opencv#10509 from kislinsk:support-msvc-14.1-minor-upgrades
2 parents 43f1b72 + fdefc4b commit ec16307

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

cmake/OpenCVConfig.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ if(NOT DEFINED OpenCV_CUDA)
6161
endif()
6262
endif()
6363

64-
if(MSVC)
64+
if(DEFINED OpenCV_ARCH AND DEFINED OpenCV_RUNTIME)
65+
# custom overrided values
66+
elseif(MSVC)
6567
if(CMAKE_CL_64)
6668
set(OpenCV_ARCH x64)
6769
set(OpenCV_TBB_ARCH intel64)
@@ -81,7 +83,7 @@ if(MSVC)
8183
set(OpenCV_RUNTIME vc12)
8284
elseif(MSVC_VERSION EQUAL 1900)
8385
set(OpenCV_RUNTIME vc14)
84-
elseif(MSVC_VERSION EQUAL 1910 OR MSVC_VERSION EQUAL 1911)
86+
elseif(MSVC_VERSION MATCHES "^191[0-9]$")
8587
set(OpenCV_RUNTIME vc15)
8688
endif()
8789
elseif(MINGW)

cmake/OpenCVDetectCXXCompiler.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ if(NOT DEFINED OpenCV_STATIC)
8282
endif()
8383
endif()
8484

85-
if(MSVC)
85+
if(DEFINED OpenCV_ARCH AND DEFINED OpenCV_RUNTIME)
86+
# custom overrided values
87+
elseif(MSVC)
8688
if(CMAKE_CL_64)
8789
set(OpenCV_ARCH x64)
8890
else()
@@ -100,7 +102,7 @@ if(MSVC)
100102
set(OpenCV_RUNTIME vc12)
101103
elseif(MSVC_VERSION EQUAL 1900)
102104
set(OpenCV_RUNTIME vc14)
103-
elseif(MSVC_VERSION EQUAL 1910 OR MSVC_VERSION EQUAL 1911)
105+
elseif(MSVC_VERSION MATCHES "^191[0-9]$")
104106
set(OpenCV_RUNTIME vc15)
105107
endif()
106108
elseif(MINGW)

0 commit comments

Comments
 (0)