aboutsummaryrefslogtreecommitdiff
path: root/tests/CMakeLists.txt
diff options
context:
space:
mode:
authorAurélien Gâteau <agateau@kde.org>2014-05-04 20:43:42 +0100
committerAlex Merry <alex.merry@kde.org>2014-05-04 20:59:53 +0100
commit73992f139276b75aeddf78f476644a2d82f9e802 (patch)
tree109b63c6061a2e8f39454a7d069643fd5d2050cb /tests/CMakeLists.txt
parent09d355975a6b9d3f89da280627a71e46c606d563 (diff)
downloadextra-cmake-modules-73992f139276b75aeddf78f476644a2d82f9e802.tar.gz
extra-cmake-modules-73992f139276b75aeddf78f476644a2d82f9e802.tar.bz2
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 <alex.merry@kde.org> as part of this commit. REVIEW: 117823
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r--tests/CMakeLists.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 171f44af..cc11aec2 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -19,6 +19,8 @@ macro(ADD_TEST_MACRO NAME COMMAND)
--test-command ${COMMAND} ${ARGN})
endmacro(ADD_TEST_MACRO)
+find_package(Qt5LinguistTools CONFIG)
+
add_test_macro(ExecuteCoreModules dummy)
add_test_macro(ExecuteKDEModules dummy)
add_test_macro(FindModules dummy)
@@ -32,3 +34,14 @@ set(ECMInstallIconsTest_EXTRA_OPTIONS
add_test_macro(ECMInstallIconsTest
${CMAKE_COMMAND} -P "${CMAKE_CURRENT_BINARY_DIR}/ECMInstallIconsTest/check_tree.cmake"
)
+
+if (Qt5LinguistTools_FOUND)
+ set(ECMPoQmToolsTest_EXTRA_OPTIONS
+ --build-target install
+ --build-options
+ "-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_CURRENT_BINARY_DIR}/ECMPoQmToolsTest/InstallDirectory"
+ )
+ add_test_macro(ECMPoQmToolsTest
+ ${CMAKE_COMMAND} -P "${CMAKE_CURRENT_BINARY_DIR}/ECMPoQmToolsTest/check_tree.cmake"
+ )
+endif()