mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 15:23:05 +04:00
Merge pull request #19319 from TolyaTalamanov:at/introduce-gopaque-garray-for-python
[G-API] Introduce GOpaque and GArray for python * Introduce GOpaque and GArray for python * Fix ctor * Avoid code duplication by using macros * gapi: move Python-specific files to misc/python * Fix windows build Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
This commit is contained in:
committed by
GitHub
parent
8fa013309e
commit
c527b3cefd
@@ -26,6 +26,12 @@ foreach(m ${OPENCV_PYTHON_MODULES})
|
||||
list(APPEND opencv_hdrs "${hdr}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# both wrapping and C++ implementation
|
||||
file(GLOB hdr2 ${OPENCV_MODULE_${m}_LOCATION}/misc/python/python_*.hpp)
|
||||
list(APPEND opencv_hdrs ${hdr2})
|
||||
list(APPEND opencv_userdef_hdrs ${hdr2})
|
||||
|
||||
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)
|
||||
|
||||
@@ -1020,8 +1020,14 @@ class PythonWrapperGenerator(object):
|
||||
decls = self.parser.parse(hdr)
|
||||
if len(decls) == 0:
|
||||
continue
|
||||
if hdr.find('opencv2/') >= 0: #Avoid including the shadow files
|
||||
self.code_include.write( '#include "{0}"\n'.format(hdr[hdr.rindex('opencv2/'):]) )
|
||||
|
||||
if hdr.find('misc/python/shadow_') < 0: # Avoid including the "shadow_" files
|
||||
if hdr.find('opencv2/') >= 0:
|
||||
# put relative path
|
||||
self.code_include.write('#include "{0}"\n'.format(hdr[hdr.rindex('opencv2/'):]))
|
||||
else:
|
||||
self.code_include.write('#include "{0}"\n'.format(hdr))
|
||||
|
||||
for decl in decls:
|
||||
name = decl[0]
|
||||
if name.startswith("struct") or name.startswith("class"):
|
||||
|
||||
Reference in New Issue
Block a user