diff --git a/cmake/OpenCVFindLibsVideo.cmake b/cmake/OpenCVFindLibsVideo.cmake index fec7be4d8..6d6ca62e8 100644 --- a/cmake/OpenCVFindLibsVideo.cmake +++ b/cmake/OpenCVFindLibsVideo.cmake @@ -254,6 +254,7 @@ if(WITH_DSHOW) endif(WITH_DSHOW) # --- VideoInput/Microsoft Media Foundation --- +ocv_clear_vars(HAVE_MSMF) if(WITH_MSMF) check_include_file(Mfapi.h HAVE_MSMF) endif(WITH_MSMF) diff --git a/modules/videoio/CMakeLists.txt b/modules/videoio/CMakeLists.txt index 3a031a9fe..67fd9816e 100644 --- a/modules/videoio/CMakeLists.txt +++ b/modules/videoio/CMakeLists.txt @@ -42,6 +42,7 @@ if (WIN32 AND HAVE_DSHOW) endif() if (WIN32 AND HAVE_MSMF) + list(APPEND videoio_srcs ${CMAKE_CURRENT_LIST_DIR}/src/cap_msmf.hpp) list(APPEND videoio_srcs ${CMAKE_CURRENT_LIST_DIR}/src/cap_msmf.cpp) endif()