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
d19147bc
Commit
d19147bc
authored
Jul 24, 2017
by
Alexander Alekhin
Committed by
GitHub
Jul 24, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9218 from alalek:backport_2.4
(2.4) Backport changes from master
parents
8736ece9
fc2a71db
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
14 deletions
+18
-14
CMakeLists.txt
CMakeLists.txt
+8
-10
OpenCVModule.cmake
cmake/OpenCVModule.cmake
+1
-1
OpenCVPCHSupport.cmake
cmake/OpenCVPCHSupport.cmake
+6
-0
cap_v4l.cpp
modules/highgui/src/cap_v4l.cpp
+3
-3
No files found.
CMakeLists.txt
View file @
d19147bc
...
...
@@ -4,11 +4,16 @@
# From the off-tree build directory, invoke:
# $ cmake <PATH_TO_OPENCV_ROOT>
#
#
# - OCT-2008: Initial version <joseluisblancoc@gmail.com>
#
# ----------------------------------------------------------------------------
# Disable in-source builds to prevent source tree corruption.
if
(
"
${
CMAKE_SOURCE_DIR
}
"
STREQUAL
"
${
CMAKE_BINARY_DIR
}
"
)
message
(
FATAL_ERROR
"
FATAL: In-source builds are not allowed.
You should create separate directory for build files.
"
)
endif
()
set
(
CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true
)
# Following block can broke build in case of cross-compilng
...
...
@@ -1094,13 +1099,6 @@ status("")
ocv_finalize_status
()
# ----------------------------------------------------------------------------
# Warn in the case of in-source build
# ----------------------------------------------------------------------------
if
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
"
STREQUAL
"
${
CMAKE_CURRENT_BINARY_DIR
}
"
)
message
(
WARNING
"The source directory is the same as binary directory.
\"
make clean
\"
may damage the source tree"
)
endif
()
# ----------------------------------------------------------------------------
# CPack stuff
# ----------------------------------------------------------------------------
...
...
cmake/OpenCVModule.cmake
View file @
d19147bc
...
...
@@ -172,7 +172,7 @@ macro(ocv_add_module _name)
project
(
${
the_module
}
)
add_definitions
(
-D_USE_MATH_DEFINES
# M_PI constant in MSVS
-D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS
# to use C libraries from C++ code (ffmpeg)
-D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS
-D__STDC_FORMAT_MACROS
# to use C libraries from C++ code (ffmpeg)
)
endif
(
OPENCV_INITIAL_PASS
)
endmacro
()
...
...
cmake/OpenCVPCHSupport.cmake
View file @
d19147bc
...
...
@@ -69,6 +69,9 @@ MACRO(_PCH_GET_COMPILE_FLAGS _out_compile_flags)
FOREACH
(
item
${
DIRINC
}
)
if
(
item MATCHES
"^
${
OpenCV_SOURCE_DIR
}
/modules/"
)
LIST
(
APPEND
${
_out_compile_flags
}
"
${
_PCH_include_prefix
}
\"
${
item
}
\"
"
)
elseif
(
CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS
"6.0"
AND
item MATCHES
"/usr/include$"
)
# workaround for GCC 6.x bug
else
()
LIST
(
APPEND
${
_out_compile_flags
}
"
${
_PCH_isystem_prefix
}
\"
${
item
}
\"
"
)
endif
()
...
...
@@ -78,6 +81,9 @@ MACRO(_PCH_GET_COMPILE_FLAGS _out_compile_flags)
FOREACH
(
item
${
DIRINC
}
)
if
(
item MATCHES
"^
${
OpenCV_SOURCE_DIR
}
/modules/"
)
LIST
(
APPEND
${
_out_compile_flags
}
"
${
_PCH_include_prefix
}
\"
${
item
}
\"
"
)
elseif
(
CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS
"6.0"
AND
item MATCHES
"/usr/include$"
)
# workaround for GCC 6.x bug
else
()
LIST
(
APPEND
${
_out_compile_flags
}
"
${
_PCH_isystem_prefix
}
\"
${
item
}
\"
"
)
endif
()
...
...
modules/highgui/src/cap_v4l.cpp
View file @
d19147bc
...
...
@@ -1164,12 +1164,12 @@ static int read_frame_v4l2(CvCaptureCAM_V4L* capture) {
//printf("got data in buff %d, len=%d, flags=0x%X, seq=%d, used=%d)\n",
// buf.index, buf.length, buf.flags, buf.sequence, buf.bytesused);
if
(
-
1
==
ioctl
(
capture
->
deviceHandle
,
VIDIOC_QBUF
,
&
buf
))
perror
(
"VIDIOC_QBUF"
);
//set timestamp in capture struct to be timestamp of most recent frame
capture
->
timestamp
=
buf
.
timestamp
;
if
(
-
1
==
ioctl
(
capture
->
deviceHandle
,
VIDIOC_QBUF
,
&
buf
))
perror
(
"VIDIOC_QBUF"
);
return
1
;
}
...
...
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