Commit ac22d3c8 authored by Alexander Alekhin's avatar Alexander Alekhin

cmake: MSVC_VERSION use pattern matching

parent 62737c77
...@@ -114,7 +114,7 @@ if(MSVC) ...@@ -114,7 +114,7 @@ if(MSVC)
set(OpenCV_RUNTIME vc12) set(OpenCV_RUNTIME vc12)
elseif(MSVC_VERSION EQUAL 1900) elseif(MSVC_VERSION EQUAL 1900)
set(OpenCV_RUNTIME vc14) set(OpenCV_RUNTIME vc14)
elseif(MSVC_VERSION EQUAL 1910 OR MSVC_VERSION EQUAL 1911 OR MSVC_VERSION EQUAL 1912) elseif(MSVC_VERSION MATCHES "^191[0-9]$")
set(OpenCV_RUNTIME vc15) set(OpenCV_RUNTIME vc15)
else() else()
message(WARNING "OpenCV does not recognize MSVC_VERSION \"${MSVC_VERSION}\". Cannot set OpenCV_RUNTIME") message(WARNING "OpenCV does not recognize MSVC_VERSION \"${MSVC_VERSION}\". Cannot set OpenCV_RUNTIME")
......
...@@ -78,7 +78,7 @@ if(MSVC) ...@@ -78,7 +78,7 @@ if(MSVC)
set(OpenCV_RUNTIME vc12) set(OpenCV_RUNTIME vc12)
elseif(MSVC_VERSION EQUAL 1900) elseif(MSVC_VERSION EQUAL 1900)
set(OpenCV_RUNTIME vc14) set(OpenCV_RUNTIME vc14)
elseif(MSVC_VERSION EQUAL 1910 OR MSVC_VERSION EQUAL 1911 OR MSVC_VERSION EQUAL 1912) elseif(MSVC_VERSION MATCHES "^191[0-9]$")
set(OpenCV_RUNTIME vc15) set(OpenCV_RUNTIME vc15)
endif() endif()
elseif(MINGW) elseif(MINGW)
......
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