~midori/midori/trunk

« back to all changes in this revision

Viewing changes to po/CMakeLists.txt

  • Committer: Christian Dywan
  • Date: 2013-08-18 00:47:45 UTC
  • mto: This revision was merged to the branch mainline in revision 6370.
  • Revision ID: christian.dywan@canonical.com-20130818004745-7yo9c8utphdhjt1k
Initial minimal CMake build setup

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (C) 2013 Christian Dywan <christian@twotoasts.de>
 
2
 
 
3
include(FindGettext)
 
4
if (GETTEXT_FOUND)
 
5
    set(LANGUAGES $ENV{LINGUAS})
 
6
    if (NOT LANGUAGES)
 
7
        file(GLOB POTFILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.po")
 
8
        string(REPLACE ".po" " " LANGUAGES ${POTFILES})
 
9
    endif ()
 
10
    message(STATUS "gettext found: ${LANGUAGES}")
 
11
    string(REPLACE " " ";" LANGUAGES ${LANGUAGES})
 
12
    foreach(LANG ${LANGUAGES})
 
13
        GETTEXT_PROCESS_PO_FILES(${LANG} ALL PO_FILES "${LANG}.po")
 
14
    endforeach ()
 
15
else ()
 
16
    message(STATUS "gettext not found")
 
17
endif ()