~ubuntu-branches/ubuntu/utopic/indicator-transfer/utopic

« back to all changes in this revision

Viewing changes to cmake/Translations.cmake

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release, Charles Kerr
  • Date: 2014-08-14 14:59:08 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20140814145908-3pluvi6n1lum21is
Tags: 0.1+14.10.20140814-0ubuntu1
[ Charles Kerr ]
Re-use the same Translations.cmake file across indicators (LP:
#1354058)

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
    add_custom_target (pot COMMENT “Building translation catalog.”)
21
21
    find_program (XGETTEXT_EXECUTABLE xgettext)
22
22
 
23
 
 
24
 
    set(C_SOURCE "")
25
 
 
 
23
    # init this list, which will hold all the sources across all dirs
 
24
    set(SOURCES "")
 
25
 
 
26
    # add each directory's sources to the overall sources list
26
27
    foreach(FILES_INPUT ${ARGN})
27
 
        file (GLOB_RECURSE SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/${FILES_INPUT}/*.c)
28
 
        foreach(C_FILE ${SOURCE_FILES})
29
 
            set(C_SOURCE ${C_SOURCE} ${C_FILE})
30
 
        endforeach()
31
 
        file (GLOB_RECURSE SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/${FILES_INPUT}/*.vala)
32
 
        foreach(C_FILE ${SOURCE_FILES})
33
 
            set(C_SOURCE ${C_SOURCE} ${C_FILE})
34
 
        endforeach()
 
28
        set (DIR ${CMAKE_CURRENT_SOURCE_DIR}/${FILES_INPUT})
 
29
        file (GLOB_RECURSE DIR_SOURCES ${DIR}/*.c ${DIR}/*.cc ${DIR}/*.cpp ${DIR}/*.cxx ${DIR}/*.vala)
 
30
        set (SOURCES ${SOURCES} ${DIR_SOURCES})
35
31
    endforeach()
36
32
 
37
33
    add_custom_command (TARGET pot COMMAND
38
34
        ${XGETTEXT_EXECUTABLE} -d ${NLS_PACKAGE} -o ${CMAKE_CURRENT_SOURCE_DIR}/${NLS_PACKAGE}.pot
39
 
        ${VALA_SOURCE} ${C_SOURCE} --keyword="_" --keyword="N_" --from-code=UTF-8
 
35
        ${SOURCES} --keyword="_" --keyword="N_" --from-code=UTF-8
40
36
        )
41
37
endmacro()