waf: generate SOAP wsdl into cpp code

This commit is contained in:
bugobliterator 2021-06-14 16:37:27 +05:30 committed by Andrew Tridgell
parent 45f58367d0
commit f6715cdaa0
2 changed files with 36 additions and 2 deletions

View File

@ -67,7 +67,34 @@ class Board:
# allow GCS disable for AP_DAL example
if cfg.options.no_gcs:
env.CXXFLAGS += ['-DHAL_NO_GCS=1']
# setup for supporting onvif cam control
if cfg.options.enable_onvif:
cfg.recurse('libraries/AP_ONVIF')
env.ENABLE_ONVIF = True
env.ROMFS_FILES += [('scripts/ONVIF_Camera_Control.lua',
'libraries/AP_Scripting/applets/ONVIF_Camera_Control.lua')]
env.DEFINES.update(
ENABLE_ONVIF=1,
SCRIPTING_ENABLE_DEFAULT=1,
)
env.AP_LIBRARIES += [
'AP_ONVIF'
]
env.CXXFLAGS += [
'-Wno-shadow',
'-Wno-undef',
]
if 'clang++' not in cfg.env.COMPILER_CXX:
env.CXXFLAGS += [
'-Wno-suggest-override',
]
else:
env.ENABLE_ONVIF = False
env.DEFINES.update(
ENABLE_ONVIF=0,
)
d = env.get_merged_dict()
# Always prepend so that arguments passed in the command line get
# the priority.
@ -444,7 +471,6 @@ class sitl(Board):
AP_SCRIPTING_CHECKS = 1, # SITL should always do runtime scripting checks
)
if self.with_can:
cfg.define('HAL_NUM_CAN_IFACES', 2)
cfg.define('UAVCAN_EXCEPTIONS', 0)

View File

@ -164,6 +164,10 @@ submodules at specific revisions.
default=True,
help="Enable runtime scripting sanity checks")
g.add_option('--enable-onvif', action='store_true',
default=False,
help="Enables and sets up ONVIF camera control")
g = opt.ap_groups['linux']
linux_options = ('--prefix', '--destdir', '--bindir', '--libdir')
@ -527,6 +531,7 @@ def _build_dynamic_sources(bld):
]
)
def write_version_header(tsk):
bld = tsk.generator.bld
return bld.write_version_header(tsk.outputs[0].abspath())
@ -600,6 +605,9 @@ def _build_recursion(bld):
dirs_to_recurse.append('libraries/AP_Scripting')
if bld.env.ENABLE_ONVIF:
dirs_to_recurse.append('libraries/AP_ONVIF')
for p in hal_dirs_patterns:
dirs_to_recurse += collect_dirs_to_recurse(
bld,