aboutsummaryrefslogtreecommitdiff
path: root/cmake/FindIntltool.cmake
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-03-22 16:57:58 -0500
committerCharles Kerr <charles.kerr@canonical.com>2013-03-22 16:57:58 -0500
commitc8ce514661476c027c2bd8b9f8c000810e105e67 (patch)
tree3aa2f790bffe827d2fa9fe14a21a27b3c95a554b /cmake/FindIntltool.cmake
parent2d7bf142998a28e1970c61bf63d6435eb4d4ac1e (diff)
downloadayatana-indicator-session-c8ce514661476c027c2bd8b9f8c000810e105e67.tar.gz
ayatana-indicator-session-c8ce514661476c027c2bd8b9f8c000810e105e67.tar.bz2
ayatana-indicator-session-c8ce514661476c027c2bd8b9f8c000810e105e67.zip
add top-level cmake files to the repo
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)
+