Commit 7cdb0eaf authored by Hamdi Sahloul's avatar Hamdi Sahloul

Enable the binding generator to parse shadow files

parent 90f47eb9
......@@ -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)
......
......@@ -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"):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment