CMake: pro2cmake.py: Improve handling of dbus interfaces/adaptor sources

Change-Id: I3b642e1ae31996a81618e312183f4cc168bbbe1b
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
This commit is contained in:
Tobias Hunger 2019-03-28 15:24:05 +01:00
parent b9a3217c41
commit 75658794e4

View File

@ -881,12 +881,14 @@ def write_sources_section(cm_fh: typing.IO[str], scope: Scope, *,
dbus_adaptors = scope.expand('DBUS_ADAPTORS')
if dbus_adaptors:
dbus_adaptors = [map_source_to_cmake(s, scope.basedir, vpath) for s in 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:
dbus_interfaces = [map_source_to_cmake(s, scope.basedir, vpath) for s in 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))