aboutsummaryrefslogtreecommitdiff
path: root/data/CMakeLists.txt
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-10-18 14:22:54 -0500
committerCharles Kerr <charles.kerr@canonical.com>2013-10-18 14:22:54 -0500
commit62d01fc8749606d8fc4614d897044462a6d703fc (patch)
treeeaf3165deadf86420b9256c3055220315c9d419e /data/CMakeLists.txt
parent99f3bc0685f85744081eefa0c22d9f7c5b13f327 (diff)
downloadayatana-indicator-datetime-62d01fc8749606d8fc4614d897044462a6d703fc.tar.gz
ayatana-indicator-datetime-62d01fc8749606d8fc4614d897044462a6d703fc.tar.bz2
ayatana-indicator-datetime-62d01fc8749606d8fc4614d897044462a6d703fc.zip
replace autotools with cmake
Diffstat (limited to 'data/CMakeLists.txt')
-rw-r--r--data/CMakeLists.txt74
1 files changed, 74 insertions, 0 deletions
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
new file mode 100644
index 0000000..f0738b3
--- /dev/null
+++ b/data/CMakeLists.txt
@@ -0,0 +1,74 @@
+##
+## GSettings schema
+##
+
+include (UseGSettings)
+set (SCHEMA_NAME "com.canonical.indicator.datetime.gschema.xml")
+set (SCHEMA_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${SCHEMA_NAME}")
+add_schema (${SCHEMA_FILE})
+
+
+##
+## DBus Service File
+##
+
+# where to install
+set (DBUS_SERVICE_DIR "${CMAKE_INSTALL_FULL_DATADIR}/dbus-1/services")
+message (STATUS "${DBUS_SERVICE_DIR} is the DBus Service File install dir")
+
+set (SERVICE_NAME "${CMAKE_PROJECT_NAME}.service")
+set (SERVICE_FILE "${CMAKE_CURRENT_BINARY_DIR}/${SERVICE_NAME}")
+set (SERVICE_FILE_IN "${CMAKE_CURRENT_SOURCE_DIR}/${SERVICE_NAME}.in")
+
+# build it
+set (pkglibexecdir "${CMAKE_INSTALL_FULL_PKGLIBEXECDIR}")
+configure_file ("${SERVICE_FILE_IN}" "${SERVICE_FILE}")
+
+# install it
+install (FILES "${SERVICE_FILE}"
+ DESTINATION "${DBUS_SERVICE_DIR}")
+
+
+##
+## Unity Indicator File
+##
+
+# where to install
+set (UNITY_INDICATOR_DIR "${CMAKE_INSTALL_FULL_DATAROOTDIR}/unity/indicators")
+message (STATUS "${UNITY_INDICATOR_DIR} is the Unity Indicator install dir")
+
+set (UNITY_INDICATOR_NAME "com.canonical.indicator.datetime")
+set (UNITY_INDICATOR_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${UNITY_INDICATOR_NAME}")
+
+install (FILES "${UNITY_INDICATOR_FILE}"
+ DESTINATION "${UNITY_INDICATOR_DIR}")
+
+
+##
+## FIXME: gnome-control-center panel
+##
+
+if (BUILD_PANEL)
+
+ install (FILES "datetime-dialog.ui"
+ DESTINATION "${CMAKE_INSTALL_DATADIR}/${CMAKE_PROJECT_NAME}")
+
+ # generate the desktop file using intltool
+ set (DESKTOP_NAME "gnome-indicator-datetime-panel.desktop")
+ set (DESKTOP_FILE "${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_NAME}")
+ set (DESKTOP_FILE_IN "${CMAKE_CURRENT_SOURCE_DIR}/${DESKTOP_NAME}.in")
+ set (ENV{LC_ALL} "C")
+ execute_process (COMMAND intltool-merge -quiet --xml-style --utf8 --no-translations "${DESKTOP_FILE_IN}" "${DESKTOP_FILE}")
+ install (FILES ${DESKTOP_FILE}
+ DESTINATION "${CMAKE_INSTALL_DATADIR}/applications")
+
+endif ()
+
+#if BUILD_CCPANEL
+# @INTLTOOL_DESKTOP_RULE@
+# desktopdir = $(datadir)/applications
+# desktop_DATA = gnome-indicator-datetime-panel.desktop
+# EXTRA_DIST += $(desktop_DATA)
+# CLEANFILES += $(desktop_DATA)
+#endif
+#EXTRA_DIST += datetime-dialog.ui $(desktop_DATA:.desktop=.desktop.in)