Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
86ec9b79
Commit
86ec9b79
authored
May 14, 2013
by
Dominik Rose
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libd1394 2.x support for mingw on windows added
parent
2a646f76
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
7 deletions
+63
-7
CMakeLists.txt
CMakeLists.txt
+14
-1
OpenCVFindLibsVideo.cmake
cmake/OpenCVFindLibsVideo.cmake
+32
-5
OpenCVUtils.cmake
cmake/OpenCVUtils.cmake
+7
-0
cap_dc1394_v2.cpp
modules/highgui/src/cap_dc1394_v2.cpp
+10
-1
No files found.
CMakeLists.txt
View file @
86ec9b79
...
...
@@ -103,6 +103,19 @@ if(UNIX AND NOT ANDROID)
endif
()
endif
()
# Add these standard paths to the search paths for FIND_PATH
# to find include files from these locations first
if
(
MINGW
)
if
(
EXISTS /mingw
)
list
(
APPEND CMAKE_LIBRARY_PATH /mingw
)
endif
()
if
(
EXISTS /mingw32
)
list
(
APPEND CMAKE_LIBRARY_PATH /mingw32
)
endif
()
if
(
EXISTS /mingw64
)
list
(
APPEND CMAKE_LIBRARY_PATH /mingw64
)
endif
()
endif
()
# ----------------------------------------------------------------------------
# OpenCV cmake options
...
...
@@ -110,7 +123,7 @@ endif()
# 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_CUDA
"Include NVidia Cuda Runtime support"
ON
IF
(
CMAKE_VERSION VERSION_GREATER
"2.8"
AND NOT ANDROID AND NOT IOS
)
)
...
...
cmake/OpenCVFindLibsVideo.cmake
View file @
86ec9b79
...
...
@@ -81,10 +81,37 @@ endif(WITH_GIGEAPI)
# --- 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
)
if
(
MINGW
)
find_path
(
CMU1394_INCLUDE_PATH
"/1394common.h"
PATH_SUFFIXES include
DOC
"The path to cmu1394 headers"
)
find_path
(
DC1394_2_INCLUDE_PATH
"/dc1394/dc1394.h"
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
}
/lib1394camera.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
}
/lib1394camera.a"
)
endif
(
HAVE_DC1394_2
)
else
(
MINGW
)
message
(
STATUS
"libdc1394 compilation is disabled (due to only MinGW compiler supported on your platform)."
)
endif
(
MINGW
)
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 ---
...
...
@@ -197,7 +224,7 @@ endif(WITH_MSMF)
# --- Extra HighGUI libs on Windows ---
if
(
WIN32
)
list
(
APPEND HIGHGUI_LIBRARIES comctl32 gdi32 ole32 vfw32
)
list
(
APPEND HIGHGUI_LIBRARIES comctl32 gdi32 ole32
setupapi ws2_32
vfw32
)
if
(
MINGW64
)
list
(
APPEND HIGHGUI_LIBRARIES avifil32 avicap32 winmm msvfw32
)
list
(
REMOVE_ITEM HIGHGUI_LIBRARIES vfw32
)
...
...
cmake/OpenCVUtils.cmake
View file @
86ec9b79
...
...
@@ -511,6 +511,13 @@ macro(ocv_parse_header2 LIBNAME HDR_PATH VARNAME)
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
()
################################################################################################
# short command to setup source group
...
...
modules/highgui/src/cap_dc1394_v2.cpp
View file @
86ec9b79
...
...
@@ -45,7 +45,16 @@
#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 winsock2.
#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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment