CMake: pro2cmake.py: Handle DBUS_*S

Handle DBUS_ADAPTORS and DBUS_INTERFACES and turn them into
equivalent CMake statements.

Change-Id: Ia8a69e7ab97d9f18df93097a6e2c7c1686cb16a3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Tobias Hunger 2019-03-18 19:13:41 +01:00
parent d84a2b8274
commit 347261aaf6

View File

@ -852,6 +852,18 @@ def write_sources_section(cm_fh: typing.IO[str], scope: Scope, *,
for l in sort_sources(sources):
cm_fh.write('{} {}\n'.format(ind, l))
dbus_adaptors = scope.expand('DBUS_ADAPTORS')
if dbus_adaptors:
cm_fh.write('{} DBUS_ADAPTOR_SOURCES\n'.format(ind))
for d in sort_sources(dbus_adaptors):
cm_fh.write('{} {}\n'.format(ind, d))
dbus_interfaces = scope.expand('DBUS_INTERFACES')
if dbus_interfaces:
cm_fh.write('{} DBUS_INTERFACE_SOURCES\n'.format(ind))
for d in sort_sources(dbus_interfaces):
cm_fh.write('{} {}\n'.format(ind, d))
defines = scope.expand('DEFINES')
if defines:
cm_fh.write('{} DEFINES\n'.format(ind))