[evolution/wip/cmake] data/ directory
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/cmake] data/ directory
- Date: Mon, 3 Oct 2016 10:22:58 +0000 (UTC)
commit dc18f53252a6af264d60ec83ffa9641dac067b4e
Author: Milan Crha <mcrha redhat com>
Date: Mon Oct 3 12:23:31 2016 +0200
data/ directory
CMakeLists.txt | 3 +-
cmake/modules/IconCache.cmake | 74 +++++++++++++
data/CMakeLists.txt | 79 ++++++++++++++
data/icons/CMakeLists.txt | 233 +++++++++++++++++++++++++++++++++++++++++
4 files changed, 388 insertions(+), 1 deletions(-)
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5c3087b..d35e60e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -163,6 +163,7 @@ include(DistTargets)
include(GLibTools)
include(GObjectIntrospection)
include(GtkDoc)
+include(IconCache)
include(InstalledTests)
include(PkgConfigEx)
include(SetupBuildFlags)
@@ -646,7 +647,7 @@ add_pkgconfig_file(evolution-shell.pc.in evolution-shell-${INTERFACE_VERSION}.pc
add_appdata_file(evolution.appdata.xml.in evolution.appdata.xml)
-#add_subdirectory(data)
+add_subdirectory(data)
#add_subdirectory(libgnomecanvas)
#add_subdirectory(e-util)
#add_subdirectory(libemail-engine)
diff --git a/cmake/modules/IconCache.cmake b/cmake/modules/IconCache.cmake
new file mode 100644
index 0000000..35470a1
--- /dev/null
+++ b/cmake/modules/IconCache.cmake
@@ -0,0 +1,74 @@
+# IconCache.cmake
+#
+# This is required here only to have defined target 'uninstall'
+# in the same directory.
+#
+# Macros:
+# add_icon_cache_files(_fileslistvar ...)
+# adds rules to install icons to icon cache directory; the arguments are
+# one or more list variables with file names.
+
+include(UninstallTarget)
+
+macro(get_one_icon_component _instring _outvalue _outrest)
+ string(FIND "${_instring}" "_" _pos)
+ if(_pos EQUAL -1)
+ message(FATAL_ERROR "get_one_icon_component() failed to get one component from
'${_instring}'")
+ endif(_pos EQUAL -1)
+
+ math(EXPR _posinc "${_pos}+1")
+
+ string(SUBSTRING "${_instring}" 0 ${_pos} ${_outvalue})
+ string(SUBSTRING "${_instring}" ${_posinc} -1 ${_outrest})
+endmacro(get_one_icon_component)
+
+macro(split_icon_components _infilename _outtheme _outcontext _outsize _outiconfile)
+ set(_rest "${_infilename}")
+
+ get_one_icon_component("${_rest}" ${_outtheme} _rest)
+ get_one_icon_component("${_rest}" ${_outcontext} _rest)
+ get_one_icon_component("${_rest}" ${_outsize} _rest)
+ set(${_outiconfile} "${_rest}")
+endmacro(split_icon_components)
+
+find_program(GTK_UPDATE_ICON_CACHE gtk-update-icon-cache)
+if(NOT GTK_UPDATE_ICON_CACHE)
+ message(WARNING "gtk-update-icon-cache not found. Make sure to call ${GTK_UPDATE_ICON_CACHE} -f -t
\"${SHARE_INSTALL_DIR}/icons/hicolor\" after install and uninstall")
+endif(NOT GTK_UPDATE_ICON_CACHE)
+
+set(_update_icon_cache_cmd ${GTK_UPDATE_ICON_CACHE} -f -t "${SHARE_INSTALL_DIR}/icons/hicolor")
+
+macro(process_icons _fileslistvar _install_codevar)
+ foreach(srcfile IN LISTS ${_fileslistvar})
+ split_icon_components(${srcfile} theme context size iconfile)
+ install(FILES ${srcfile}
+ DESTINATION ${SHARE_INSTALL_DIR}/icons/${theme}/${context}/${size}
+ RENAME ${iconfile}
+ )
+ set(${_install_codevar} "${${_install_codevar}}
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
\"${CMAKE_CURRENT_SOURCE_DIR}/${srcfile}\"
\"${SHARE_INSTALL_DIR}/icons/${theme}/${context}/${size}/${iconfile}\""
+ )
+ endforeach(srcfile)
+endmacro(process_icons)
+
+macro(add_icon_cache_files _fileslistvar)
+ set(_install_code)
+
+ foreach(_filesvar ${_fileslistvar} ${ARGN})
+ process_icons(${_filesvar} _install_code)
+ endforeach(_filesvar)
+
+ if(GTK_UPDATE_ICON_CACHE)
+ install(CODE
+ "execute_process(${_install_code}
+ COMMAND ${CMAKE_COMMAND} -E chdir . ${_update_icon_cache_cmd}
+ )")
+ endif(GTK_UPDATE_ICON_CACHE)
+endmacro(add_icon_cache_files)
+
+if(GTK_UPDATE_ICON_CACHE)
+ add_custom_command(TARGET uninstall POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E chdir . ${_update_icon_cache_cmd}
+ COMMENT "Updating icon cache in '${SHARE_INSTALL_DIR}/icons/hicolor'"
+ )
+endif(GTK_UPDATE_ICON_CACHE)
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
new file mode 100644
index 0000000..486e9b0
--- /dev/null
+++ b/data/CMakeLists.txt
@@ -0,0 +1,79 @@
+set(filedeps)
+set(autostartdir ${SYSCONF_INSTALL_DIR}/xdg/autostart)
+set(desktopdir ${SHARE_INSTALL_DIR}/applications)
+set(themedir ${privdatadir}/theme)
+
+configure_file(evolution.desktop.in.in
+ evolution.desktop.in
+ @ONLY
+)
+
+intltool_merge(${CMAKE_CURRENT_BINARY_DIR}/evolution.desktop.in evolution.desktop --desktop-style --utf8)
+
+list(APPEND filedeps ${CMAKE_CURRENT_BINARY_DIR}/evolution.desktop)
+
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/evolution.desktop
+ DESTINATION ${desktopdir}
+)
+
+configure_file(evolution-alarm-notify.desktop.in.in
+ evolution-alarm-notify.desktop.in
+ @ONLY
+)
+
+intltool_merge(${CMAKE_CURRENT_BINARY_DIR}/evolution-alarm-notify.desktop.in evolution-alarm-notify.desktop
--desktop-style --utf8)
+
+list(APPEND filedeps ${CMAKE_CURRENT_BINARY_DIR}/evolution-alarm-notify.desktop)
+
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/evolution-alarm-notify.desktop
+ DESTINATION ${autostartdir}
+)
+
+install(FILES webview.css
+ webview-print.css
+ DESTINATION ${themedir}
+)
+
+set(SCHEMAS
+ org.gnome.evolution.gschema.xml
+ org.gnome.evolution.addressbook.gschema.xml
+ org.gnome.evolution.calendar.gschema.xml
+ org.gnome.evolution.importer.gschema.xml
+ org.gnome.evolution.mail.gschema.xml
+ org.gnome.evolution.shell.gschema.xml
+ org.gnome.evolution.bogofilter.gschema.xml
+ org.gnome.evolution.spamassassin.gschema.xml
+ org.gnome.evolution.plugin.attachment-reminder.gschema.xml
+ org.gnome.evolution.plugin.autocontacts.gschema.xml
+ org.gnome.evolution.plugin.email-custom-header.gschema.xml
+ org.gnome.evolution.plugin.external-editor.gschema.xml
+ org.gnome.evolution.plugin.face-picture.gschema.xml
+ org.gnome.evolution.plugin.itip.gschema.xml
+ org.gnome.evolution.plugin.mail-notification.gschema.xml
+ org.gnome.evolution.plugin.prefer-plain.gschema.xml
+ org.gnome.evolution.plugin.publish-calendar.gschema.xml
+ org.gnome.evolution.plugin.templates.gschema.xml
+)
+
+set(BUILT_SCHEMAS)
+foreach(_schema IN LISTS SCHEMAS)
+ intltool_merge(${_schema}.in ${_schema} --no-translations --xml-style --utf8)
+ list(APPEND BUILT_SCHEMAS ${CMAKE_CURRENT_BINARY_DIR}/${_schema})
+endforeach(_schema)
+
+add_custom_command(OUTPUT gschemas.compiled
+ COMMAND ${GLIB_COMPILE_SCHEMAS} .
+)
+
+add_custom_target(data-files ALL
+ DEPENDS gschemas.compiled
+ ${filedeps}
+)
+
+add_gsettings_schemas(data-files ${BUILT_SCHEMAS})
+
+install(FILES evolution.convert
+ DESTINATION ${SHARE_INSTALL_DIR}/GConf/gsettings
+)
+
+add_subdirectory(icons)
diff --git a/data/icons/CMakeLists.txt b/data/icons/CMakeLists.txt
new file mode 100644
index 0000000..e313828
--- /dev/null
+++ b/data/icons/CMakeLists.txt
@@ -0,0 +1,233 @@
+set(public_icons
+ hicolor_apps_16x16_evolution.png
+ hicolor_apps_16x16_evolution-mail.png
+ hicolor_apps_16x16_evolution-memos.png
+ hicolor_apps_16x16_evolution-tasks.png
+ hicolor_apps_22x22_evolution.png
+ hicolor_apps_22x22_evolution-mail.png
+ hicolor_apps_22x22_evolution-memos.png
+ hicolor_apps_22x22_evolution-tasks.png
+ hicolor_apps_24x24_evolution.png
+ hicolor_apps_24x24_evolution-mail.png
+ hicolor_apps_24x24_evolution-memos.png
+ hicolor_apps_24x24_evolution-tasks.png
+ hicolor_apps_32x32_evolution.png
+ hicolor_apps_32x32_evolution-mail.png
+ hicolor_apps_32x32_evolution-memos.png
+ hicolor_apps_32x32_evolution-tasks.png
+ hicolor_apps_48x48_evolution.png
+ hicolor_apps_48x48_evolution-mail.png
+ hicolor_apps_48x48_evolution-memos.png
+ hicolor_apps_48x48_evolution-tasks.png
+ hicolor_apps_256x256_evolution.png
+ hicolor_apps_symbolic_evolution-symbolic.svg
+)
+
+# hicolor_status_16x16_wrapped.png was copied from Firefox
+# (toolkit/themes/gnomestripe/global/icons/wrap.png), which
+# contained the following notice:
+#
+# All files in this directory are assumed to be licensed under the
+# tri-license (MPL/GPL/LGPL) used throughout this codebase.
+#
+# There is no corresponding SVG file. */
+
+set(private_icons
+ hicolor_apps_16x16_contact-editor.png
+ hicolor_apps_16x16_im-aim.png
+ hicolor_apps_16x16_im-icq.png
+ hicolor_apps_16x16_im-jabber.png
+ hicolor_apps_16x16_im-msn.png
+ hicolor_apps_16x16_im-nov.png
+ hicolor_apps_16x16_im-yahoo.png
+ hicolor_apps_22x22_contact-editor.png
+ hicolor_apps_22x22_im-aim.png
+ hicolor_apps_22x22_im-icq.png
+ hicolor_apps_22x22_im-jabber.png
+ hicolor_apps_22x22_im-msn.png
+ hicolor_apps_22x22_im-nov.png
+ hicolor_apps_22x22_im-yahoo.png
+ hicolor_apps_24x24_contact-editor.png
+ hicolor_apps_24x24_im-aim.png
+ hicolor_apps_24x24_im-icq.png
+ hicolor_apps_24x24_im-jabber.png
+ hicolor_apps_24x24_im-msn.png
+ hicolor_apps_24x24_im-nov.png
+ hicolor_apps_24x24_im-yahoo.png
+ hicolor_apps_32x32_contact-editor.png
+ hicolor_apps_48x48_contact-editor.png
+ hicolor_apps_scalable_im-aim.svg
+ hicolor_apps_scalable_im-icq.svg
+ hicolor_apps_scalable_im-jabber.svg
+ hicolor_apps_scalable_im-msn.svg
+ hicolor_apps_scalable_im-nov.svg
+ hicolor_apps_scalable_im-yahoo.svg
+ hicolor_actions_16x16_folder-copy.png
+ hicolor_actions_16x16_folder-move.png
+ hicolor_actions_16x16_mail-archive.png
+ hicolor_actions_16x16_mail-copy.png
+ hicolor_actions_16x16_mail-move.png
+ hicolor_actions_16x16_go-today.png
+ hicolor_actions_16x16_view-calendar-day.png
+ hicolor_actions_16x16_view-calendar-list.png
+ hicolor_actions_16x16_view-calendar-month.png
+ hicolor_actions_16x16_view-calendar-week.png
+ hicolor_actions_16x16_view-calendar-workweek.png
+ hicolor_actions_22x22_go-today.png
+ hicolor_actions_22x22_view-calendar-day.png
+ hicolor_actions_22x22_view-calendar-list.png
+ hicolor_actions_22x22_view-calendar-month.png
+ hicolor_actions_22x22_view-calendar-week.png
+ hicolor_actions_22x22_view-calendar-workweek.png
+ hicolor_actions_24x24_go-today.png
+ hicolor_actions_24x24_mail-archive.png
+ hicolor_actions_24x24_query-free-busy.png
+ hicolor_actions_24x24_view-calendar-day.png
+ hicolor_actions_24x24_view-calendar-list.png
+ hicolor_actions_24x24_view-calendar-month.png
+ hicolor_actions_24x24_view-calendar-week.png
+ hicolor_actions_24x24_view-calendar-workweek.png
+ hicolor_actions_32x32_view-calendar-day.png
+ hicolor_actions_32x32_view-calendar-list.png
+ hicolor_actions_32x32_view-calendar-month.png
+ hicolor_actions_32x32_view-calendar-week.png
+ hicolor_actions_32x32_view-calendar-workweek.png
+ hicolor_actions_scalable_view-calendar-day.svg
+ hicolor_actions_scalable_view-calendar-list.svg
+ hicolor_actions_scalable_view-calendar-month.svg
+ hicolor_actions_scalable_view-calendar-week.svg
+ hicolor_actions_scalable_view-calendar-workweek.svg
+ hicolor_categories_48x48_preferences-autocompletion.png
+ hicolor_categories_48x48_preferences-calendar-and-tasks.png
+ hicolor_categories_48x48_preferences-certificates.png
+ hicolor_categories_48x48_preferences-composer.png
+ hicolor_categories_48x48_preferences-mail.png
+ hicolor_categories_48x48_preferences-mail-accounts.png
+ hicolor_categories_48x48_preferences-system-network-proxy.png
+ hicolor_places_16x16_mail-inbox.png
+ hicolor_places_16x16_mail-outbox.png
+ hicolor_places_16x16_mail-sent.png
+ hicolor_places_22x22_mail-inbox.png
+ hicolor_places_22x22_mail-outbox.png
+ hicolor_places_22x22_mail-sent.png
+ hicolor_places_24x24_mail-inbox.png
+ hicolor_places_24x24_mail-outbox.png
+ hicolor_places_24x24_mail-sent.png
+ hicolor_status_16x16_wrapped.png
+ hicolor_status_32x32_offline.png
+ hicolor_status_32x32_online.png
+)
+
+# These icons were in gnome-icon-theme prior to GNOME 2.30.
+# XXX Need to reevaluate which icons we really need and drop the rest.
+# Many are not Tango-compliant and look dated and out of place.
+set(stock_private_icons
+ hicolor_actions_16x16_stock_bell.png
+ hicolor_actions_16x16_stock_contact-list.png
+ hicolor_actions_16x16_stock_insert-note.png
+ hicolor_actions_16x16_stock_insert-rule.png
+ hicolor_actions_16x16_stock_insert-table.png
+ hicolor_actions_16x16_stock_mail-filters-apply.png
+ hicolor_actions_16x16_stock_mail-flag-for-followup-done.png
+ hicolor_actions_16x16_stock_mail-flag-for-followup.png
+ hicolor_actions_16x16_stock_mail-open-multiple.png
+ hicolor_actions_16x16_stock_mail-unread-multiple.png
+ hicolor_actions_16x16_stock_new-24h-appointment.png
+ hicolor_actions_16x16_stock_notes.png
+ hicolor_actions_16x16_stock_people.png
+ hicolor_actions_16x16_stock_select-column.png
+ hicolor_actions_16x16_stock_select-row.png
+ hicolor_actions_16x16_stock_shared-by-me.png
+ hicolor_actions_16x16_stock_shared-to-me.png
+ hicolor_actions_16x16_stock_show-all.png
+ hicolor_actions_16x16_stock_task-assigned-to.png
+ hicolor_actions_16x16_stock_task-assigned.png
+ hicolor_actions_16x16_stock_task-recurring.png
+ hicolor_actions_16x16_stock_task.png
+ hicolor_actions_16x16_stock_text-monospaced.png
+ hicolor_actions_16x16_stock_timezone.png
+ hicolor_actions_16x16_stock_todo.png
+ hicolor_actions_16x16_stock_video-conferencing.png
+ hicolor_actions_16x16_stock_view-details.png
+ hicolor_actions_24x24_stock_new-24h-appointment.png
+ hicolor_actions_24x24_stock_contact-list.png
+ hicolor_actions_24x24_stock_insert-note.png
+ hicolor_actions_24x24_stock_insert-rule.png
+ hicolor_actions_24x24_stock_insert-table.png
+ hicolor_actions_24x24_stock_mail-filters-apply.png
+ hicolor_actions_24x24_stock_mail-open-multiple.png
+ hicolor_actions_24x24_stock_mail-unread-multiple.png
+ hicolor_actions_24x24_stock_notes.png
+ hicolor_actions_24x24_stock_people.png
+ hicolor_actions_24x24_stock_select-column.png
+ hicolor_actions_24x24_stock_select-row.png
+ hicolor_actions_24x24_stock_shared-by-me.png
+ hicolor_actions_24x24_stock_shared-to-me.png
+ hicolor_actions_24x24_stock_show-all.png
+ hicolor_actions_24x24_stock_task-assigned-to.png
+ hicolor_actions_24x24_stock_task-assigned.png
+ hicolor_actions_24x24_stock_task-recurring.png
+ hicolor_actions_24x24_stock_task.png
+ hicolor_actions_24x24_stock_text-monospaced.png
+ hicolor_actions_24x24_stock_timezone.png
+ hicolor_actions_24x24_stock_todo.png
+ hicolor_actions_24x24_stock_video-conferencing.png
+ hicolor_actions_48x48_stock_alarm.png
+ hicolor_actions_48x48_stock_mail-flag-for-followup-done.png
+ hicolor_actions_48x48_stock_mail-flag-for-followup.png
+ hicolor_actions_48x48_stock_new-24h-appointment.png
+ hicolor_actions_48x48_stock_notes.png
+ hicolor_actions_48x48_stock_people.png
+ hicolor_actions_48x48_stock_timezone.png
+ hicolor_actions_48x48_stock_todo.png
+ hicolor_status_16x16_stock_check-filled.png
+ hicolor_status_16x16_stock_score-high.png
+ hicolor_status_16x16_stock_score-higher.png
+ hicolor_status_16x16_stock_score-highest.png
+ hicolor_status_16x16_stock_score-low.png
+ hicolor_status_16x16_stock_score-lower.png
+ hicolor_status_16x16_stock_score-lowest.png
+ hicolor_status_16x16_stock_score-normal.png
+ hicolor_status_16x16_stock_signature-bad.png
+ hicolor_status_16x16_stock_signature-ok.png
+ hicolor_status_16x16_stock_signature.png
+ hicolor_status_24x24_stock_signature-bad.png
+ hicolor_status_24x24_stock_signature-ok.png
+ hicolor_status_24x24_stock_signature.png
+ hicolor_status_48x48_stock_signature-bad.png
+ hicolor_status_48x48_stock_signature-ok.png
+ hicolor_status_48x48_stock_signature.png
+)
+
+# These are source files for future editing
+# and are not meant to be installed as icons.
+set(noinst_icons
+ hicolor_apps_scalable_evolution.svg
+ hicolor_actions_16x16_go-today.svg
+ hicolor_actions_16x16_view-calendar-day.svg
+ hicolor_actions_16x16_view-calendar-list.svg
+ hicolor_actions_16x16_view-calendar-month.svg
+ hicolor_actions_16x16_view-calendar-week.svg
+ hicolor_actions_16x16_view-calendar-workweek.svg
+ hicolor_actions_22x22_go-today.svg
+ hicolor_actions_22x22_view-calendar-day.svg
+ hicolor_actions_22x22_view-calendar-list.svg
+ hicolor_actions_22x22_view-calendar-month.svg
+ hicolor_actions_22x22_view-calendar-week.svg
+ hicolor_actions_22x22_view-calendar-workweek.svg
+ hicolor_actions_32x32_view-calendar-day.svg
+ hicolor_actions_32x32_view-calendar-list.svg
+ hicolor_actions_32x32_view-calendar-month.svg
+ hicolor_actions_32x32_view-calendar-week.svg
+ hicolor_actions_32x32_view-calendar-workweek.svg
+ hicolor_places_16x16_mail-inbox.svg
+ hicolor_places_16x16_mail-outbox.svg
+ hicolor_places_16x16_mail-sent.svg
+ hicolor_places_22x22_mail-inbox.svg
+ hicolor_places_22x22_mail-outbox.svg
+ hicolor_places_22x22_mail-sent.svg
+ hicolor_status_32x32_offline.svg
+ hicolor_status_32x32_online.svg
+)
+
+add_icon_cache_files(public_icons private_icons stock_private_icons)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]