~cairo-dock-team/ubuntu/oneiric/cairo-dock/2.3.0-3

« back to all changes in this revision

Viewing changes to po/CMakeLists.txt

  • Committer: Bazaar Package Importer
  • Author(s): Matthieu Baerts (matttbe)
  • Date: 2010-08-09 23:26:12 UTC
  • mto: This revision was merged to the branch mainline in revision 13.
  • Revision ID: james.westby@ubuntu.com-20100809232612-pocdxliaxjdetm37
Tags: upstream-2.2.0~0beta4
Import upstream version 2.2.0~0beta4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
find_program (MSGFMT_EXECUTABLE msgfmt)
 
3
 
 
4
#on cree une nouvelle cible i18n liée à la cible all.
 
5
add_custom_target (i18n ALL COMMENT “Building i18n messages.”)
 
6
 
 
7
# on liste tous les .po
 
8
file (GLOB PO_FILES *.po)
 
9
 
 
10
# on parcours cette liste.
 
11
foreach (PO_INPUT ${PO_FILES})
 
12
        get_filename_component (PO_INPUT_BASE ${PO_INPUT} NAME_WE)  # NAME Without Extension.
 
13
        if (NOT "${PO_INPUT_BASE}" STREQUAL "en_GB") # en_GB has been created only for LaunchPad translation tool
 
14
                set (MO_OUTPUT ${PO_INPUT_BASE}.gmo)  # le nom du fichier en sortie.
 
15
                message (STATUS "  Building ${MO_OUTPUT}...")
 
16
                add_custom_command (TARGET i18n COMMAND ${MSGFMT_EXECUTABLE} -o  ${CMAKE_CURRENT_BINARY_DIR}/${MO_OUTPUT} ${PO_INPUT})  # appel a msgfmt.
 
17
                install (FILES  ${CMAKE_CURRENT_BINARY_DIR}/${MO_OUTPUT} DESTINATION ${datadir}/locale/${PO_INPUT_BASE}/LC_MESSAGES RENAME ${GETTEXT_PACKAGE}.mo)  # installation du fichier dans le bon repertoire.
 
18
        endif()
 
19
endforeach ()