aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-08-14 14:50:53 +0000
committerCI bot <ps-jenkins@lists.canonical.com>2014-08-14 14:50:53 +0000
commit7c2aed0807a8da5b9ac27ddceee80727035f1afc (patch)
tree158ba23efa28e864094dbb2621efb381f67e989a
parent42414e053db93373d0eb1859d4b060aca1391004 (diff)
parente613cb596f8d06b03cd968b999cd24e5468e034c (diff)
downloadayatana-indicator-power-7c2aed0807a8da5b9ac27ddceee80727035f1afc.tar.gz
ayatana-indicator-power-7c2aed0807a8da5b9ac27ddceee80727035f1afc.tar.bz2
ayatana-indicator-power-7c2aed0807a8da5b9ac27ddceee80727035f1afc.zip
Re-use the same Translations.cmake file across indicators Fixes: 1354058
Approved by: Ted Gould, PS Jenkins bot
-rw-r--r--cmake/Translations.cmake18
1 files changed, 7 insertions, 11 deletions
diff --git a/cmake/Translations.cmake b/cmake/Translations.cmake
index d41f04e..b51c39d 100644
--- a/cmake/Translations.cmake
+++ b/cmake/Translations.cmake
@@ -20,22 +20,18 @@ macro(add_translations_catalog NLS_PACKAGE)
add_custom_target (pot COMMENT “Building translation catalog.”)
find_program (XGETTEXT_EXECUTABLE xgettext)
+ # init this list, which will hold all the sources across all dirs
+ set(SOURCES "")
- set(C_SOURCE "")
-
+ # add each directory's sources to the overall sources list
foreach(FILES_INPUT ${ARGN})
- file (GLOB_RECURSE SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/${FILES_INPUT}/*.c)
- foreach(C_FILE ${SOURCE_FILES})
- set(C_SOURCE ${C_SOURCE} ${C_FILE})
- endforeach()
- file (GLOB_RECURSE SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/${FILES_INPUT}/*.vala)
- foreach(C_FILE ${SOURCE_FILES})
- set(C_SOURCE ${C_SOURCE} ${C_FILE})
- endforeach()
+ set (DIR ${CMAKE_CURRENT_SOURCE_DIR}/${FILES_INPUT})
+ file (GLOB_RECURSE DIR_SOURCES ${DIR}/*.c ${DIR}/*.cc ${DIR}/*.cpp ${DIR}/*.cxx ${DIR}/*.vala)
+ set (SOURCES ${SOURCES} ${DIR_SOURCES})
endforeach()
add_custom_command (TARGET pot COMMAND
${XGETTEXT_EXECUTABLE} -d ${NLS_PACKAGE} -o ${CMAKE_CURRENT_SOURCE_DIR}/${NLS_PACKAGE}.pot
- ${VALA_SOURCE} ${C_SOURCE} --keyword="_" --keyword="N_" --from-code=UTF-8
+ ${SOURCES} --keyword="_" --keyword="N_" --from-code=UTF-8
)
endmacro()