[Pkg-owncloud-commits] [qtkeychain] 72/115: Support building of translations with Qt5

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Mar 15 19:25:46 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository qtkeychain.

commit 6be1967c8169320e70f8ccc14bc56884ec17ce96
Author: Uwe L. Korn <uwelk at xhochy.com>
Date:   Sat Aug 3 16:32:31 2013 +0200

    Support building of translations with Qt5
---
 CMakeLists.txt | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e14c0f0..701c9ae 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,6 +22,13 @@ if (Qt5Core_FOUND)
       qt5_add_dbus_interface(${ARGN})
     endmacro()
   endif()
+  find_package(Qt5LinguistTools REQUIRED)
+  macro(qt_add_translation)
+    qt5_add_translation(${ARGN})
+  endmacro(qt_add_translation)
+  macro(qt_create_translation)
+    qt5_create_translation(${ARGN})
+  endmacro(qt_create_translation)
   macro(qt_wrap_cpp)
     qt5_wrap_cpp(${ARGN})
   endmacro()
@@ -48,6 +55,12 @@ else()
   endif()
   include_directories(${QT_INCLUDES})
   set(QTCORE_LIBRARIES ${QT_QTCORE_LIBRARY})
+  macro(qt_add_translation)
+    qt4_add_translation(${ARGN})
+  endmacro(qt_add_translation)
+  macro(qt_create_translation)
+    qt4_create_translation(${ARGN})
+  endmacro(qt_create_translation)
   macro(qt_wrap_cpp)
     qt4_wrap_cpp(${ARGN})
   endmacro()
@@ -93,8 +106,8 @@ set(qtkeychain_TR_FILES
 )
 
 file(GLOB qtkeychain_TR_SOURCES *.cpp *.h *.ui)
-qt4_create_translation(qtkeychain_MESSAGES ${qtkeychain_TR_SOURCES} ${qtkeychain_TR_FILES})
-qt4_add_translation(qtkeychain_QM_FILES ${qtkeychain_TR_FILES})
+qt_create_translation(qtkeychain_MESSAGES ${qtkeychain_TR_SOURCES} ${qtkeychain_TR_FILES})
+qt_add_translation(qtkeychain_QM_FILES ${qtkeychain_TR_FILES})
 add_custom_target(messages DEPENDS ${qtkeychain_MESSAGES})
 add_custom_target(translations DEPENDS ${qtkeychain_QM_FILES})
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/qtkeychain.git



More information about the Pkg-owncloud-commits mailing list