From 61d803b7701f030f5f8e1bf1f0b183056ee4dfc4 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Thu, 16 Dec 2021 13:16:20 +0100 Subject: Make Lomiri features configurable at build time --- tests/CMakeLists.txt | 6 +++--- tests/dbus-types/CMakeLists.txt | 6 +++--- tests/integration/CMakeLists.txt | 2 +- tests/integration/indicator-sound-test-base.cpp | 2 +- tests/service-mocks/CMakeLists.txt | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) (limited to 'tests') diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 3e03a20..9a72e0e 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -34,8 +34,8 @@ add_custom_target ( set (XDG_DATA_DIRS "${CMAKE_CURRENT_BINARY_DIR}/gsettings-schemas") set (SCHEMA_DIR "${XDG_DATA_DIRS}/glib-2.0/schemas") -if(LOMIRI_SCHEMAS_FOUND) - add_definitions ( -DHAS_LOMIRI_SCHEMAS ) +if(ENABLE_LOMIRI_FEATURES) + add_definitions ( -DLOMIRI_FEATURES_ENABLED ) endif() add_definitions(-DSCHEMA_DIR="${SCHEMA_DIR}") @@ -324,7 +324,7 @@ add_test(indicator-test indicator-test ) -if (LOMIRI_API_FOUND AND LOMIRI_SCHEMAS_FOUND) +if (ENABLE_LOMIRI_FEATURES) add_subdirectory(integration) endif() add_subdirectory(dbus-types) diff --git a/tests/dbus-types/CMakeLists.txt b/tests/dbus-types/CMakeLists.txt index c872635..9c2e679 100644 --- a/tests/dbus-types/CMakeLists.txt +++ b/tests/dbus-types/CMakeLists.txt @@ -14,7 +14,7 @@ set(dbusinterface_accounts_xml "org.freedesktop.Accounts.xml") set_source_files_properties(${dbusinterface_accounts_xml} PROPERTIES CLASSNAME AccountsInterface) -if(LOMIRI_SCHEMAS_FOUND) +if(ENABLE_LOMIRI_FEATURES) set_source_files_properties("com.lomiri.AccountsService.Sound.xml" PROPERTIES CLASSNAME AccountsSoundInterface) endif() @@ -38,8 +38,8 @@ qt5_add_dbus_interface(interface_files ${dbusinterface_streamrestore_xml} stream qt5_add_dbus_interface(interface_files ${dbusinterface_properties_xml} dbus_properties_interface) qt5_add_dbus_interface(interface_files ${dbusinterface_accounts_xml} dbus_accounts_interface) -if(LOMIRI_SCHEMAS_FOUND) - qt5_add_dbus_interface("com.lomiri.AccountsService.Sound.xml" dbus_accountssound_interface) +if(ENABLE_LOMIRI_FEATURES) + qt5_add_dbus_interface(interface_files "com.lomiri.AccountsService.Sound.xml" dbus_accountssound_interface) endif() qt5_add_dbus_interface(interface_files ${dbusinterface_actions_xml} dbus_menus_interface) diff --git a/tests/integration/CMakeLists.txt b/tests/integration/CMakeLists.txt index 97c18b1..3493e18 100644 --- a/tests/integration/CMakeLists.txt +++ b/tests/integration/CMakeLists.txt @@ -1,7 +1,7 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) -if(LOMIRI_API_FOUND) +if(ENABLE_LOMIRI_FEATURES) pkg_check_modules(GMENUHARNESS REQUIRED libgmenuharness REQUIRED) include_directories(${GMENUHARNESS_INCLUDE_DIRS}) endif() diff --git a/tests/integration/indicator-sound-test-base.cpp b/tests/integration/indicator-sound-test-base.cpp index 6c64815..3ecd856 100644 --- a/tests/integration/indicator-sound-test-base.cpp +++ b/tests/integration/indicator-sound-test-base.cpp @@ -179,7 +179,7 @@ bool IndicatorSoundTestBase::clearGSettingsPlayers() bool IndicatorSoundTestBase::resetAllowAmplifiedVolume() { -#if HAS_LOMIRI_SCHEMAS +#if LOMIRI_FEATURES_ENABLED QProcess proc; proc.start("gsettings", QStringList() diff --git a/tests/service-mocks/CMakeLists.txt b/tests/service-mocks/CMakeLists.txt index 87221da..007ab23 100644 --- a/tests/service-mocks/CMakeLists.txt +++ b/tests/service-mocks/CMakeLists.txt @@ -1,4 +1,4 @@ -if(LOMIRI_SCHEMAS_FOUND) +if(ENABLE_LOMIRI_FEATURES) add_subdirectory(accounts-mock) endif() add_subdirectory(media-player-mpris-mock) -- cgit v1.2.3