blob: f8f1349ea3b954abcde645b1b8f8642c65ad7b10 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
diff -ru performous-1.0.orig/lang/CMakeLists.txt performous-1.0/lang/CMakeLists.txt
--- performous-1.0.orig/lang/CMakeLists.txt 2014-10-28 19:11:45.000000000 -0400
+++ performous-1.0/lang/CMakeLists.txt 2015-02-22 04:25:40.502252942 -0500
@@ -9,5 +9,13 @@
file(MAKE_DIRECTORY "${mobuild}")
add_custom_command(OUTPUT "${mofile}" COMMAND "${Msgfmt_BIN}" -v "${pofile}" -o "${mofile}" MAIN_DEPENDENCY "${pofile}" COMMENT "Building ${language} locale" VERBATIM)
add_custom_target("locale_${language}" ALL DEPENDS "${mofile}") # Make sure the mofiles are always built
- install(FILES "${mofile}" DESTINATION "${LOCALE_DIR}/${language}/LC_MESSAGES")
endforeach(language)
+foreach(language $ENV{LINGUAS})
+ set(pofile ${CMAKE_CURRENT_SOURCE_DIR}/${language}.po)
+ if (EXISTS ${pofile})
+ set(mofile ${CMAKE_CURRENT_BINARY_DIR}/${language}.mo)
+ install(FILES ${mofile} DESTINATION
+{LOCALE_DIR}/${language}/LC_MESSAGES RENAME ${CMAKE_PROJECT_NAME}.mo)
+ endif()
+endforeach(language)
+
|