From 81a2976123ac89d29628a610d3ac96f1d57beadd Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 16 Jan 2018 10:05:25 +0100 Subject: Some CMakeLists.txt optimizations. --- tests/dbus-types/CMakeLists.txt | 7 +++---- tests/service-mocks/accounts-mock/CMakeLists.txt | 18 +++++------------- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/tests/dbus-types/CMakeLists.txt b/tests/dbus-types/CMakeLists.txt index f669bca..5323f51 100644 --- a/tests/dbus-types/CMakeLists.txt +++ b/tests/dbus-types/CMakeLists.txt @@ -16,14 +16,13 @@ set_source_files_properties(${dbusinterface_accounts_xml} PROPERTIES if(EXISTS "/usr/share/accountsservice/interfaces/com.ubuntu.AccountsService.Sound.xml") set(dbusinterface_accountssound_xml "com.ubuntu.AccountsService.Sound.xml") - set_source_files_properties(${dbusinterface_accountssound_xml} PROPERTIES - CLASSNAME AccountsSoundInterface) else() set(dbusinterface_accountssound_xml "org.ayatana.AccountsService.Sound.xml") - set_source_files_properties(${dbusinterface_accountssound_xml} PROPERTIES - CLASSNAME AccountsSoundInterface) endif() +set_source_files_properties(${dbusinterface_accountssound_xml} PROPERTIES + CLASSNAME AccountsSoundInterface) + set(dbusinterface_properties_xml "org.freedesktop.DBus.Properties.xml") set_source_files_properties(${dbusinterface_properties_xml} PROPERTIES CLASSNAME DBusPropertiesInterface diff --git a/tests/service-mocks/accounts-mock/CMakeLists.txt b/tests/service-mocks/accounts-mock/CMakeLists.txt index 9ef32fa..421e155 100644 --- a/tests/service-mocks/accounts-mock/CMakeLists.txt +++ b/tests/service-mocks/accounts-mock/CMakeLists.txt @@ -19,19 +19,11 @@ set_source_files_properties(${dbusinterface_sound_xml} PROPERTIES qt5_add_dbus_interface(interface_files ${dbusinterface_sound_xml} accountsservice_sound_interface) -if(EXISTS "/usr/share/accountsservice/interfaces/com.ubuntu.AccountsService.Sound.xml") - qt5_add_dbus_adaptor(adaptor_files - com.ubuntu.AccountsService.Sound.Mock.xml - AccountsServiceSoundMock.h - ubuntu::indicators::testing::AccountsServiceSoundMock - AccountsServiceSoundMockAdaptor) -else() - qt5_add_dbus_adaptor(adaptor_files - org.ayatana.AccountsService.Sound.Mock.xml - AccountsServiceSoundMock.h - ubuntu::indicators::testing::AccountsServiceSoundMock - AccountsServiceSoundMockAdaptor) -endif() +qt5_add_dbus_adaptor(adaptor_files + ${dbusinterface_sound_xml} + AccountsServiceSoundMock.h + ubuntu::indicators::testing::AccountsServiceSoundMock + AccountsServiceSoundMockAdaptor) qt5_add_dbus_adaptor(adaptor_files ${CMAKE_SOURCE_DIR}/tests/dbus-types/org.freedesktop.Accounts.xml -- cgit v1.2.3