aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-08-09 18:30:53 -0500
committerCharles Kerr <charles.kerr@canonical.com>2014-08-09 18:30:53 -0500
commit355123ee20d0795e9c16e5be93899318f67af2d8 (patch)
tree60397d689566aadab33ae2058abf35cd786a8f9a /cmake
parent7205a28eef54b0c7c5404793410d943fd4b8e0e8 (diff)
downloadayatana-indicator-session-355123ee20d0795e9c16e5be93899318f67af2d8.tar.gz
ayatana-indicator-session-355123ee20d0795e9c16e5be93899318f67af2d8.tar.bz2
ayatana-indicator-session-355123ee20d0795e9c16e5be93899318f67af2d8.zip
sync the shared Translations.cmake file to pick up recent bugfixes.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Translations.cmake20
1 files changed, 8 insertions, 12 deletions
diff --git a/cmake/Translations.cmake b/cmake/Translations.cmake
index 178bded..b51c39d 100644
--- a/cmake/Translations.cmake
+++ b/cmake/Translations.cmake
@@ -10,7 +10,7 @@ macro(add_translations_directory NLS_PACKAGE)
add_custom_command (TARGET i18n COMMAND ${MSGFMT_EXECUTABLE} -o ${MO_OUTPUT} ${PO_INPUT})
install (FILES ${MO_OUTPUT} DESTINATION
- ${CMAKE_INSTALL_LOCALEDIR}/LC_MESSAGES
+ ${CMAKE_INSTALL_LOCALEDIR}/${PO_INPUT_BASE}/LC_MESSAGES
RENAME ${NLS_PACKAGE}.mo)
endforeach (PO_INPUT ${PO_FILES})
endmacro(add_translations_directory)
@@ -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()