From c196df6db019d2715cf3736928b9abe44390a151 Mon Sep 17 00:00:00 2001 From: Evgeny Agafonchikov Date: Fri, 20 Mar 2015 18:19:18 +0300 Subject: [PATCH] Do not link vfw32 library for WinRT HAVE_VFW flag is defined by CMake try_compile check. Check fails for WINRT as vfw.h begins with and contains empty set of functions for Store apps. So we can safely remove vfw32.lib for WINRT in general (independently of availability for specific configuration) --- cmake/OpenCVFindLibsVideo.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/OpenCVFindLibsVideo.cmake b/cmake/OpenCVFindLibsVideo.cmake index be394857c0..60135945d7 100644 --- a/cmake/OpenCVFindLibsVideo.cmake +++ b/cmake/OpenCVFindLibsVideo.cmake @@ -262,7 +262,9 @@ endif(WITH_MSMF) # --- Extra HighGUI and VideoIO libs on Windows --- if(WIN32) list(APPEND HIGHGUI_LIBRARIES comctl32 gdi32 ole32 setupapi ws2_32) - list(APPEND VIDEOIO_LIBRARIES vfw32) + if(HAVE_VFW) + list(APPEND VIDEOIO_LIBRARIES vfw32) + endif() if(MINGW64) list(APPEND VIDEOIO_LIBRARIES avifil32 avicap32 winmm msvfw32) list(REMOVE_ITEM VIDEOIO_LIBRARIES vfw32)