diff --git a/cmake/OpenCVFindLibsVideo.cmake b/cmake/OpenCVFindLibsVideo.cmake index 41bfc65538..91fb6a7eca 100644 --- a/cmake/OpenCVFindLibsVideo.cmake +++ b/cmake/OpenCVFindLibsVideo.cmake @@ -169,12 +169,11 @@ endif(WITH_VIDEOINPUT) # --- Extra HighGUI libs on Windows --- if(WIN32) - list(APPEND HIGHGUI_LIBRARIES comctl32 gdi32 ole32) - if(MSVC) - list(APPEND HIGHGUI_LIBRARIES vfw32) - elseif(MINGW64) - list(APPEND HIGHGUI_LIBRARIES msvfw32 avifil32 avicap32 winmm) + list(APPEND HIGHGUI_LIBRARIES comctl32 gdi32 ole32 vfw32) + if(MINGW64) + list(APPEND HIGHGUI_LIBRARIES avifil32 avicap32 winmm msvfw32) + list(REMOVE_ITEM HIGHGUI_LIBRARIES vfw32) elseif(MINGW) - list(APPEND HIGHGUI_LIBRARIES vfw32 winmm) + list(APPEND HIGHGUI_LIBRARIES winmm) endif() endif(WIN32) diff --git a/modules/highgui/CMakeLists.txt b/modules/highgui/CMakeLists.txt index 7a57b090c4..d53c17c40f 100644 --- a/modules/highgui/CMakeLists.txt +++ b/modules/highgui/CMakeLists.txt @@ -107,7 +107,6 @@ endif() if(WIN32) list(APPEND highgui_srcs src/cap_vfw.cpp src/cap_cmu.cpp src/cap_dshow.cpp) - list(APPEND HIGHGUI_LIBRARIES vfw32) endif(WIN32) if(HAVE_XINE)