From 347261aaf64ce30f5dc45f2b16c7bc7a693cdea3 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Mon, 18 Mar 2019 19:13:41 +0100 Subject: [PATCH] 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 --- util/cmake/pro2cmake.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index 56d5f24b676..c5bd96b90bc 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -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))