From 73992f139276b75aeddf78f476644a2d82f9e802 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20G=C3=A2teau?= Date: Sun, 4 May 2014 20:43:42 +0100 Subject: Add ECMPoQmTools module ecm_create_qm_from_po_files() was actually not very useful in practice. So that is deprecated, to be removed before ECM 1.0. Instead, the ECMPoQmTools provides several useful functions: ecm_create_qm_loader() (which already existed in ECMCreateQmFromPoFiles), ecm_process_po_files_as_qm() (which has the same signature as gettext_process_po_files() from the FindGettext module) and ecm_install_po_files_as_qm(), which is a convenience function mostly for the benefit of KDE Frameworks (although potentially useful for whatever other projects have the unusual requirement of a Gettext translation workflow but no Gettext usage in the code). NB: some clean-up to the documentation was done by Alex Merry as part of this commit. REVIEW: 117823 --- tests/ECMPoQmToolsTest/CMakeLists.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 tests/ECMPoQmToolsTest/CMakeLists.txt (limited to 'tests/ECMPoQmToolsTest/CMakeLists.txt') diff --git a/tests/ECMPoQmToolsTest/CMakeLists.txt b/tests/ECMPoQmToolsTest/CMakeLists.txt new file mode 100644 index 00000000..eabf2b88 --- /dev/null +++ b/tests/ECMPoQmToolsTest/CMakeLists.txt @@ -0,0 +1,22 @@ +project(ECMPoQmToolsTest) +cmake_minimum_required(VERSION 2.8.12) +set(ECM_MODULE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../modules") + +set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../modules) + +# make sure the test install dir is clean +file(REMOVE_RECURSE "${CMAKE_INSTALL_PREFIX}") + +include(ECMPoQmTools) + +ecm_create_qm_loader(QMLOADER_PATH catalog) + +ecm_process_po_files_as_qm(fr ALL + INSTALL_DESTINATION share/locale + PO_FILES test.po +) + +ecm_install_po_files_as_qm(po) + +# this will be run by CTest +configure_file(check_tree.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/check_tree.cmake" @ONLY) -- cgit v1.2.1