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
7cdb0eaf
Commit
7cdb0eaf
authored
Aug 24, 2018
by
Hamdi Sahloul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable the binding generator to parse shadow files
parent
90f47eb9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
CMakeLists.txt
modules/python/bindings/CMakeLists.txt
+2
-0
gen2.py
modules/python/src2/gen2.py
+2
-1
No files found.
modules/python/bindings/CMakeLists.txt
View file @
7cdb0eaf
...
...
@@ -26,6 +26,8 @@ foreach(m ${OPENCV_PYTHON_MODULES})
list
(
APPEND opencv_hdrs
"
${
hdr
}
"
)
endif
()
endforeach
()
file
(
GLOB hdr
${
OPENCV_MODULE_
${
m
}
_LOCATION
}
/misc/python/shadow*.hpp
)
list
(
APPEND opencv_hdrs
${
hdr
}
)
file
(
GLOB userdef_hdrs
${
OPENCV_MODULE_
${
m
}
_LOCATION
}
/misc/python/pyopencv*.hpp
)
list
(
APPEND opencv_userdef_hdrs
${
userdef_hdrs
}
)
endforeach
(
m
)
...
...
modules/python/src2/gen2.py
View file @
7cdb0eaf
...
...
@@ -1019,7 +1019,8 @@ class PythonWrapperGenerator(object):
decls
=
self
.
parser
.
parse
(
hdr
)
if
len
(
decls
)
==
0
:
continue
self
.
code_include
.
write
(
'#include "{0}"
\n
'
.
format
(
hdr
[
hdr
.
rindex
(
'opencv2/'
):])
)
if
hdr
.
find
(
'opencv2/'
)
>=
0
:
#Avoid including the shadow files
self
.
code_include
.
write
(
'#include "{0}"
\n
'
.
format
(
hdr
[
hdr
.
rindex
(
'opencv2/'
):])
)
for
decl
in
decls
:
name
=
decl
[
0
]
if
name
.
startswith
(
"struct"
)
or
name
.
startswith
(
"class"
):
...
...
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