diff options
author | Robert Tari <robert@tari.in> | 2021-11-11 00:10:38 +0100 |
---|---|---|
committer | Robert Tari <robert@tari.in> | 2021-11-15 04:40:51 +0100 |
commit | 88e440bb1689063c6d47ac7a4965eb597a8ec9cb (patch) | |
tree | a603306b2a6ba80ca8053e48b18deccc1ee37cf5 /tests/CMakeLists.txt | |
parent | 425c531ba241415514743f7cc6dae8c17683cb9f (diff) | |
download | ayatana-indicator-sound-88e440bb1689063c6d47ac7a4965eb597a8ec9cb.tar.gz ayatana-indicator-sound-88e440bb1689063c6d47ac7a4965eb597a8ec9cb.tar.bz2 ayatana-indicator-sound-88e440bb1689063c6d47ac7a4965eb597a8ec9cb.zip |
Clean up schema detection and conditional code
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r-- | tests/CMakeLists.txt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index d0c0ac6..3e03a20 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -33,9 +33,11 @@ add_custom_target ( # and help the tests to find that file by setting -DSCHEMA_DIR set (XDG_DATA_DIRS "${CMAKE_CURRENT_BINARY_DIR}/gsettings-schemas") set (SCHEMA_DIR "${XDG_DATA_DIRS}/glib-2.0/schemas") -if (EXISTS /usr/share/glib-2.0/schemas/com.lomiri.sound.gschema.xml) - add_definitions ( -DHAS_LOMIRI_SOUND_SCHEMA ) + +if(LOMIRI_SCHEMAS_FOUND) + add_definitions ( -DHAS_LOMIRI_SCHEMAS ) endif() + add_definitions(-DSCHEMA_DIR="${SCHEMA_DIR}") execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} gio-2.0 --variable glib_compile_schemas OUTPUT_VARIABLE COMPILE_SCHEMA_EXECUTABLE @@ -322,7 +324,7 @@ add_test(indicator-test indicator-test ) -if (LOMIRI_API_FOUND AND EXISTS "/usr/share/glib-2.0/schemas/com.lomiri.sound.gschema.xml") +if (LOMIRI_API_FOUND AND LOMIRI_SCHEMAS_FOUND) add_subdirectory(integration) endif() add_subdirectory(dbus-types) |