diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-10-21 11:20:19 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-10-21 11:20:19 +0200 |
commit | 590f9614f0d9a48026dd9618bf6213b16968be1a (patch) | |
tree | 51ff47a110125a442e1c5270e53e3185148a9cac | |
parent | 21588e910f8ccae29024bcc1df6af9010a60d00d (diff) | |
parent | 27ca88b28dbe975d474ed599437e2cce062b2f05 (diff) | |
download | ayatana-indicator-session-590f9614f0d9a48026dd9618bf6213b16968be1a.tar.gz ayatana-indicator-session-590f9614f0d9a48026dd9618bf6213b16968be1a.tar.bz2 ayatana-indicator-session-590f9614f0d9a48026dd9618bf6213b16968be1a.zip |
Merge branch 'tari01-pr/use-native-cmake-gsettings'
Attributes GH PR #55: https://github.com/AyatanaIndicators/ayatana-indicator-session/pull/55
-rw-r--r-- | cmake/UseGSettings.cmake | 23 | ||||
-rw-r--r-- | data/CMakeLists.txt | 7 |
2 files changed, 4 insertions, 26 deletions
diff --git a/cmake/UseGSettings.cmake b/cmake/UseGSettings.cmake deleted file mode 100644 index 3b61523..0000000 --- a/cmake/UseGSettings.cmake +++ /dev/null @@ -1,23 +0,0 @@ -# GSettings.cmake, CMake macros written for Marlin, feel free to re-use them. - -macro(add_schema SCHEMA_NAME) - - set(PKG_CONFIG_EXECUTABLE pkg-config) - set(GSETTINGS_DIR "${CMAKE_INSTALL_FULL_DATAROOTDIR}/glib-2.0/schemas") - - # Run the validator and error if it fails - execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} gio-2.0 --variable glib_compile_schemas OUTPUT_VARIABLE _glib_compile_schemas OUTPUT_STRIP_TRAILING_WHITESPACE) - execute_process (COMMAND ${_glib_compile_schemas} --dry-run --schema-file=${SCHEMA_NAME} ERROR_VARIABLE _schemas_invalid OUTPUT_STRIP_TRAILING_WHITESPACE) - - if (_schemas_invalid) - message (SEND_ERROR "Schema validation error: ${_schemas_invalid}") - endif (_schemas_invalid) - - # Actually install and recomple schemas - message (STATUS "${GSETTINGS_DIR} is the GSettings install dir") - install (FILES ${SCHEMA_NAME} DESTINATION ${GSETTINGS_DIR} OPTIONAL) - - install (CODE "message (STATUS \"Compiling GSettings schemas\")") - install (CODE "execute_process (COMMAND ${_glib_compile_schemas} ${GSETTINGS_DIR})") -endmacro() - diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index dd02205..b0b87ff 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -1,4 +1,4 @@ -include (UseGSettings) +find_package(GSettings) ## ## GSettings schema @@ -12,8 +12,9 @@ set (SCHEMA_FILE_IN "${CMAKE_CURRENT_SOURCE_DIR}/${SCHEMA_NAME}.in") 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}) +# let GSettings do the rest +set(GSETTINGS_COMPILE ON) +add_schema (${SCHEMA_NAME}) ## ## Systemd Unit File |