Index: opencv/cmake/OpenCVUtils.cmake
===================================================================
--- opencv/cmake/OpenCVUtils.cmake	(revision 8395)
+++ opencv/cmake/OpenCVUtils.cmake	(working copy)
@@ -366,3 +366,11 @@
                    ${LIBNAME}_VERSION_STRING)
   endif()
 endmacro()
+
+# read single version info from the pkg file
+macro(ocv_parse_pkg LIBNAME PKG_PATH SCOPE)
+  if(EXISTS "${PKG_PATH}/${LIBNAME}.pc")
+    file(STRINGS "${PKG_PATH}/${LIBNAME}.pc" line_to_parse REGEX "^Version:[ \t]+[0-9.]*.*$" LIMIT_COUNT 1)
+    STRING(REGEX REPLACE ".*Version: ([^ ]+).*" "\\1" ALIASOF_${LIBNAME}_VERSION "${line_to_parse}" )
+  endif()
+endmacro()
Index: opencv/CMakeLists.txt
===================================================================
--- opencv/CMakeLists.txt	(revision 8395)
+++ opencv/CMakeLists.txt	(working copy)
@@ -107,7 +107,7 @@
 
 # Optional 3rd party components
 # ===================================================
-OCV_OPTION(WITH_1394           "Include IEEE1394 support"                    ON   IF (UNIX AND NOT ANDROID AND NOT IOS) )
+OCV_OPTION(WITH_1394           "Include IEEE1394 support"                    ON   IF (NOT ANDROID AND NOT IOS) )
 OCV_OPTION(WITH_AVFOUNDATION   "Use AVFoundation for Video I/O"              ON   IF IOS)
 OCV_OPTION(WITH_CARBON         "Use Carbon for UI instead of Cocoa"          OFF  IF APPLE )
 OCV_OPTION(WITH_CUBLAS         "Include NVidia Cuda Basic Linear Algebra Subprograms (BLAS) library support" OFF IF (CMAKE_VERSION VERSION_GREATER "2.8" AND NOT ANDROID AND NOT IOS) )
@@ -418,10 +418,35 @@
 # --- Dc1394 ---
 ocv_clear_vars(HAVE_DC1394 HAVE_DC1394_2)
 if(WITH_1394)
-  CHECK_MODULE(libdc1394-2 HAVE_DC1394_2)
-  if(NOT HAVE_DC1394_2)
-    CHECK_MODULE(libdc1394 HAVE_DC1394)
-  endif()
+  if(WIN32)
+    find_path(CMU1394_INCLUDE_PATH "include/1394common.h"
+              PATHS ENV ProgramFiles ENV ProgramW6432
+              PATH_SUFFIXES include
+              DOC "The path to cmu1394 headers")
+    find_path(DC1394_2_INCLUDE_PATH "include/dc1394/dc1394.h"
+              PATHS ENV ProgramFiles ENV ProgramW6432
+              PATH_SUFFIXES include
+              DOC "The path to DC1394 2.x headers")
+    if(CMU1394_INCLUDE_PATH AND DC1394_2_INCLUDE_PATH)
+      set(CMU1394_LIB_DIR  "${CMU1394_INCLUDE_PATH}/../lib"  CACHE PATH "Full path of CMU1394 library directory")
+      set(DC1394_2_LIB_DIR "${DC1394_2_INCLUDE_PATH}/../lib" CACHE PATH "Full path of DC1394 2.x library directory")
+      if(EXISTS "${CMU1394_LIB_DIR}/libcmu1394.a" AND EXISTS "${DC1394_2_LIB_DIR}/libdc1394.a")
+        set(HAVE_DC1394_2 TRUE)
+	  endif()
+    endif()
+    if(HAVE_DC1394_2)
+      ocv_parse_pkg("libdc1394-2" "${DC1394_2_LIB_DIR}/pkgconfig" "")
+      ocv_include_directories(${DC1394_2_INCLUDE_PATH})
+      set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES}
+          "${DC1394_2_LIB_DIR}/libdc1394.a"
+          "${CMU1394_LIB_DIR}/libcmu1394.a")
+    endif(HAVE_DC1394_2)
+  else(WIN32)
+    CHECK_MODULE(libdc1394-2 HAVE_DC1394_2)
+    if(NOT HAVE_DC1394_2)
+      CHECK_MODULE(libdc1394 HAVE_DC1394)
+    endif()
+  endif(WIN32)
 endif(WITH_1394)
 
 # --- xine ---
@@ -528,7 +553,7 @@
 
 # --- Extra HighGUI libs on Windows ---
 if(WIN32)
-  list(APPEND HIGHGUI_LIBRARIES comctl32 gdi32 ole32)
+  list(APPEND HIGHGUI_LIBRARIES comctl32 gdi32 ole32 setupapi ws2_32)
   if(MSVC)
     list(APPEND HIGHGUI_LIBRARIES vfw32)
   elseif(MINGW64)
Index: opencv/modules/highgui/src/cap_dc1394_v2.cpp
===================================================================
--- opencv/modules/highgui/src/cap_dc1394_v2.cpp	(revision 8392)
+++ opencv/modules/highgui/src/cap_dc1394_v2.cpp	(working copy)
@@ -45,7 +45,17 @@
 
 #include <unistd.h>
 #include <stdint.h>
-#include <sys/select.h>
+#ifdef WIN32
+  /* On Windows, we have no sys/select.h, but we need to pick up */
+  /* select() which is in winsock.                               */
+  #ifndef __SYS_SELECT_H__
+    #define __SYS_SELECT_H__ 1
+    #include <winsock2.h>
+  #endif
+#else
+  #include <sys/select.h>
+#endif /*WIN32*/
+
 #include <dc1394/dc1394.h>
 #include <stdlib.h>
 #include <string.h>
