Title: [161370] trunk/Source/WebCore/platform/gtk/po
- Revision
- 161370
- Author
- [email protected]
- Date
- 2014-01-06 13:52:38 -0800 (Mon, 06 Jan 2014)
Log Message
[GTK] [CMake] Improve the way that translations are built with the built-in gettext support CMake
https://bugs.webkit.org/show_bug.cgi?id=126453
Reviewed by Gustavo Noronha Silva.
* CMakeLists.txt: Use the built-in CMake support for gettext to simplify the way we
build translation files and to automatically take care of installing them. Also adjust
the pot file build location to make the CMake build more similar to autotools.
Modified Paths
Diff
Modified: trunk/Source/WebCore/platform/gtk/po/CMakeLists.txt (161369 => 161370)
--- trunk/Source/WebCore/platform/gtk/po/CMakeLists.txt 2014-01-06 21:48:15 UTC (rev 161369)
+++ trunk/Source/WebCore/platform/gtk/po/CMakeLists.txt 2014-01-06 21:52:38 UTC (rev 161370)
@@ -1,5 +1,12 @@
+include(FindGettext)
+
+# GETTEXT_CREATE_TRANSLATIONS automatically runs msgmerge, which is something we
+# didn't do in the old autotools build. This overwrites all the po files in the
+# Source directory. Perhaps we want this, but for now disable it to maintain compatibility.
+set(GETTEXT_MSGMERGE_EXECUTABLE :)
+
set(domain WebKitGTK-3.0)
-set(build_directory ${CMAKE_BINARY_DIR}/po)
+set(build_directory ${CMAKE_BINARY_DIR}/Source/WebCore/platform/gtk/po)
set(pot_file ${build_directory}/${domain}.pot)
set(potfiles_file ${build_directory}/POTFILES)
@@ -23,25 +30,4 @@
)
file(GLOB po_files *.po)
-foreach (file ${po_files})
- get_filename_component(language ${file} NAME_WE)
- set(mo_file ${build_directory}/${language}.mo)
- list(APPEND mo_files ${mo_file})
-
- add_custom_command(
- OUTPUT ${mo_file}
- DEPENDS ${file}
- DEPENDS ${pot_file}
- COMMAND msgfmt -c -o ${mo_file} ${file}
- )
-endforeach ()
-
-add_custom_target(update-mo-files ALL
- DEPENDS ${mo_files}
-)
-
-add_custom_target(update-po ALL
- DEPENDS update-mo-files
- DEPENDS ${pot_file}
-)
-
+GETTEXT_CREATE_TRANSLATIONS(${pot_file} ALL ${po_files})
Modified: trunk/Source/WebCore/platform/gtk/po/ChangeLog (161369 => 161370)
--- trunk/Source/WebCore/platform/gtk/po/ChangeLog 2014-01-06 21:48:15 UTC (rev 161369)
+++ trunk/Source/WebCore/platform/gtk/po/ChangeLog 2014-01-06 21:52:38 UTC (rev 161370)
@@ -1,3 +1,14 @@
+2014-01-06 Martin Robinson <[email protected]>
+
+ [GTK] [CMake] Improve the way that translations are built with the built-in gettext support CMake
+ https://bugs.webkit.org/show_bug.cgi?id=126453
+
+ Reviewed by Gustavo Noronha Silva.
+
+ * CMakeLists.txt: Use the built-in CMake support for gettext to simplify the way we
+ build translation files and to automatically take care of installing them. Also adjust
+ the pot file build location to make the CMake build more similar to autotools.
+
2014-01-05 Reinout van Schouwen <[email protected]>
[GTK] Updated Dutch translation
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes