From 2b1103c1d3636bff007a342c7b83737dcfb86347 Mon Sep 17 00:00:00 2001 From: Patrik Huber Date: Sat, 2 May 2015 13:31:43 +0100 Subject: [PATCH] Add support for VS2015 Without the fix, OpenCV will compile and silently copy the compiled libs/executables to a location not prefixed with arch/vc14, and OpenCV won't be picked up by find_package and OpenCVConfig.cmake. --- cmake/OpenCVConfig.cmake | 2 ++ cmake/OpenCVDetectCXXCompiler.cmake | 2 ++ 2 files changed, 4 insertions(+) diff --git a/cmake/OpenCVConfig.cmake b/cmake/OpenCVConfig.cmake index 99162405a..e2ce60f9f 100644 --- a/cmake/OpenCVConfig.cmake +++ b/cmake/OpenCVConfig.cmake @@ -79,6 +79,8 @@ if(MSVC) set(OpenCV_RUNTIME vc11) elseif(MSVC_VERSION EQUAL 1800) set(OpenCV_RUNTIME vc12) + elseif(MSVC_VERSION EQUAL 1900) + set(OpenCV_RUNTIME vc14) endif() elseif(MINGW) set(OpenCV_RUNTIME mingw) diff --git a/cmake/OpenCVDetectCXXCompiler.cmake b/cmake/OpenCVDetectCXXCompiler.cmake index c5e71b98d..aa7a8b6a6 100644 --- a/cmake/OpenCVDetectCXXCompiler.cmake +++ b/cmake/OpenCVDetectCXXCompiler.cmake @@ -140,6 +140,8 @@ if(MSVC) set(OpenCV_RUNTIME vc11) elseif(MSVC_VERSION EQUAL 1800) set(OpenCV_RUNTIME vc12) + elseif(MSVC_VERSION EQUAL 1900) + set(OpenCV_RUNTIME vc14) endif() elseif(MINGW) set(OpenCV_RUNTIME mingw)