aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-11-19 09:16:00 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-11-19 09:34:25 +0100
commitf59500bfe360dce317af6b3c24c9a71206e9011a (patch)
treec83c457014f69088aecfeef6cc3b4cb5f455e474 /tests
parent5a2368bf0bf87721540ec0183b6ba4c88fd0be3e (diff)
downloadayatana-indicator-display-f59500bfe360dce317af6b3c24c9a71206e9011a.tar.gz
ayatana-indicator-display-f59500bfe360dce317af6b3c24c9a71206e9011a.tar.bz2
ayatana-indicator-display-f59500bfe360dce317af6b3c24c9a71206e9011a.zip
GSettings: Use org.ayatana.display.gschema.xml for non-Lomiri sessions and unit tests.
Additionally, internationalize the org.ayatana.display GSettings schema. Fixes https://github.com/AyatanaIndicators/ayatana-indicator-display/issues/39
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/CMakeLists.txt7
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/unit/CMakeLists.txt b/tests/unit/CMakeLists.txt
index 5656bed..a70362a 100644
--- a/tests/unit/CMakeLists.txt
+++ b/tests/unit/CMakeLists.txt
@@ -12,16 +12,13 @@ set_source_files_properties (gschemas.compiled GENERATED)
# 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.touch.system.gschema.xml)
- set (DISPLAY_SCHEMA /usr/share/glib-2.0/schemas/com.lomiri.touch.system.gschema.xml)
-else()
- set (DISPLAY_SCHEMA ${CMAKE_SOURCE_DIR}/data/org.ayatana.display.gschema.xml)
-endif()
+set (DISPLAY_SCHEMA ${CMAKE_BINARY_DIR}/data/org.ayatana.display.gschema.xml)
add_definitions(-DSCHEMA_DIR="${SCHEMA_DIR}")
execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} gio-2.0 --variable glib_compile_schemas
OUTPUT_VARIABLE COMPILE_SCHEMA_EXECUTABLE
OUTPUT_STRIP_TRAILING_WHITESPACE)
add_custom_command (OUTPUT gschemas.compiled
+ DEPENDS ${CMAKE_BINARY_DIR}/data/org.ayatana.display.gschema.xml
COMMAND mkdir -p ${SCHEMA_DIR}
COMMAND cp -f ${DISPLAY_SCHEMA} ${SCHEMA_DIR}
COMMAND ${COMPILE_SCHEMA_EXECUTABLE} ${SCHEMA_DIR})