geary/cmake/FindIntltool.cmake
Jens Georg 01f8831f3b make install doesn't respect --prefix: Closes #6001
Also fixed was code to detect location of installed .desktop file.
2013-05-08 11:00:58 -07:00

23 lines
841 B
CMake

# FindIntltool.cmake
#
# Jim Nelson <jim@yorba.org>
# Copyright 2012-2013 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 ${CMAKE_INSTALL_PREFIX}/share/applications)
endmacro (INTLTOOL_MERGE_DESKTOP desktop_id po_dir)
endif (INTLTOOL_MERGE_FOUND)