diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2018-03-26 15:58:52 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-03-26 21:02:35 +0000 |
commit | eec442b9de799ca1c955f460537157b7a5c69b89 (patch) | |
tree | d04ea5cd603d40e9b5faaed4d4920630bc89585a /data/CMakeLists.txt | |
parent | b72e44163e22433fd3f0cab38d126fde4545ab8f (diff) | |
download | ayatana-indicator-datetime-eec442b9de799ca1c955f460537157b7a5c69b89.tar.gz ayatana-indicator-datetime-eec442b9de799ca1c955f460537157b7a5c69b89.tar.bz2 ayatana-indicator-datetime-eec442b9de799ca1c955f460537157b7a5c69b89.zip |
generate .gschema.xml.in to include cmake constants e.g. alarm_default_sound
Diffstat (limited to 'data/CMakeLists.txt')
-rw-r--r-- | data/CMakeLists.txt | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index bd03e9d..f158346 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -2,9 +2,19 @@ ## GSettings schema ## -find_package (GSettings) - -add_schema ("org.ayatana.indicator.datetime.gschema.xml") +include (UseGSettings) +set (SCHEMA_NAME "org.ayatana.indicator.datetime.gschema.xml") +set (SCHEMA_FILE_IN_IN "${CMAKE_CURRENT_SOURCE_DIR}/${SCHEMA_NAME}.in.in") +set (SCHEMA_FILE_IN "${CMAKE_CURRENT_BINARY_DIR}/${SCHEMA_NAME}.in") +set (SCHEMA_FILE "${CMAKE_CURRENT_BINARY_DIR}/${SCHEMA_NAME}") +# generate the .xml.in file so cmake constants are included +configure_file(${SCHEMA_FILE_IN_IN} ${SCHEMA_FILE_IN}) +# generate the .xml file using intltool +set (ENV{LC_ALL} "C") +execute_process (COMMAND intltool-merge -quiet --xml-style --utf8 --no-translations "${SCHEMA_FILE_IN}" "${SCHEMA_FILE}") + +# let UseGSettings do the rest +add_schema (${SCHEMA_FILE}) ## ## Systemd Unit File |