aboutsummaryrefslogtreecommitdiff
path: root/data/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'data/CMakeLists.txt')
-rw-r--r--data/CMakeLists.txt31
1 files changed, 31 insertions, 0 deletions
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
new file mode 100644
index 0000000..507df29
--- /dev/null
+++ b/data/CMakeLists.txt
@@ -0,0 +1,31 @@
+# ayatana-settings.8
+
+install (FILES "${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.8" DESTINATION "${CMAKE_INSTALL_FULL_MANDIR}/man8")
+
+# ayatana-settings.desktop
+
+find_package (Intltool REQUIRED)
+configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.desktop.in" "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}.desktop.intl" @ONLY)
+intltool_merge_translations ("${CMAKE_PROJECT_NAME}.desktop.intl" "${CMAKE_PROJECT_NAME}.desktop" ALL UTF8)
+install (FILES "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}.desktop" DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/applications")
+
+# icons/ContrastHigh/scalable/apps/ayatana-settings.svg
+# icons/hicolor/scalable/apps/ayatana-settings.svg
+
+install (DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/icons" DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}")
+
+# ayatana-settings-gresource.c
+
+find_program (GLIB_COMPILE_RESOURCES NAMES glib-compile-resources REQUIRED)
+
+add_custom_command (
+ OUTPUT "${CMAKE_PROJECT_NAME}-gresource.c"
+ WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+ COMMAND "${GLIB_COMPILE_RESOURCES}"
+ ARGS --target "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}-gresource.c" --generate-source "${CMAKE_PROJECT_NAME}.xml"
+ VERBATIM
+ MAIN_DEPENDENCY "${CMAKE_PROJECT_NAME}.xml"
+ DEPENDS "${CMAKE_PROJECT_NAME}.ui"
+)
+
+add_custom_target ("data" DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}-gresource.c")