aboutsummaryrefslogtreecommitdiff
path: root/cmake/FindIntltool.cmake
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2013-08-27 12:55:22 -0500
committerTed Gould <ted@gould.cx>2013-08-27 12:55:22 -0500
commitc440b9d6a1737e3be03e205e32fec64ebdfcb2df (patch)
treeb74867b600c41ff03ed87565eae38d2daaa47d5f /cmake/FindIntltool.cmake
parent4661ef2d0a834509194d069466e3905aece05183 (diff)
parentb7a8f35077f950dc6dab640e759341c1c2476f5c (diff)
downloadayatana-indicator-session-c440b9d6a1737e3be03e205e32fec64ebdfcb2df.tar.gz
ayatana-indicator-session-c440b9d6a1737e3be03e205e32fec64ebdfcb2df.tar.bz2
ayatana-indicator-session-c440b9d6a1737e3be03e205e32fec64ebdfcb2df.zip
Merging trunk
Diffstat (limited to 'cmake/FindIntltool.cmake')
-rw-r--r--cmake/FindIntltool.cmake23
1 files changed, 23 insertions, 0 deletions
diff --git a/cmake/FindIntltool.cmake b/cmake/FindIntltool.cmake
new file mode 100644
index 0000000..45318c4
--- /dev/null
+++ b/cmake/FindIntltool.cmake
@@ -0,0 +1,23 @@
+# FindIntltool.cmake
+#
+# Jim Nelson <jim@yorba.org>
+# Copyright 2012 Yorba Foundation
+
+find_program (INTLTOOL_MERGE_EXECUTABLE intltool-merge)
+
+if (INTLTOOL_MERGE_EXECUTABLE)
+ set (INTLTOOL_MERGE_FOUND TRUE)
+else (INTLTOOL_MERGE_EXECUTABLE)
+ set (INTLTOOL_MERGE_FOUND FALSE)
+endif (INTLTOOL_MERGE_EXECUTABLE)
+
+if (INTLTOOL_MERGE_FOUND)
+ macro (INTLTOOL_MERGE_DESKTOP desktop_id po_dir)
+ add_custom_target (geary.desktop ALL
+ ${INTLTOOL_MERGE_EXECUTABLE} --desktop-style ${CMAKE_SOURCE_DIR}/${po_dir}
+ ${CMAKE_CURRENT_SOURCE_DIR}/${desktop_id}.desktop.in ${desktop_id}.desktop
+ )
+ install (FILES ${CMAKE_CURRENT_BINARY_DIR}/geary.desktop DESTINATION /usr/share/applications)
+ endmacro (INTLTOOL_MERGE_DESKTOP desktop_id po_dir)
+endif (INTLTOOL_MERGE_FOUND)
+