diff ui/CMakeLists.txt @ 418:1be8826207ca

merged.
author Raimund Renkert <rrenkert@intevation.de>
date Thu, 17 Apr 2014 08:41:44 +0200
parents 413b29f6758f
children 16b6d5686835
line wrap: on
line diff
--- a/ui/CMakeLists.txt	Wed Apr 16 17:46:40 2014 +0200
+++ b/ui/CMakeLists.txt	Thu Apr 17 08:41:44 2014 +0200
@@ -10,6 +10,8 @@
 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../common)
 add_definitions(${Qt5Widgets_DEFINITIONS})
 
+find_package(Qt5LinguistTools)
+
 set(CERTIFICATELIST_SOURCES
     ${CMAKE_CURRENT_SOURCE_DIR}/certificatelist.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/certificate.cpp
@@ -108,7 +110,14 @@
 
 set(ADMINSTRATOR_SOURCES_WITH_RESOURCES ${ADMINSTRATOR_SOURCES})
 qt5_add_resources(ADMINSTRATOR_SOURCES_WITH_RESOURCES ${ADMINSTRATOR_RESOURCES})
-add_executable(administrator ${ADMINSTRATOR_SOURCES_WITH_RESOURCES})
+
+if(Qt5LinguistTools_FOUND)
+   qt5_create_translation(ADMINISTRATOR_TRANSLATION ${ADMINSTRATOR_SOURCES_WITH_RESOURCES}
+      ${CMAKE_CURRENT_SOURCE_DIR}/l10n/administrator.ts)
+  add_executable(administrator ${ADMINSTRATOR_SOURCES_WITH_RESOURCES} ${ADMINISTRATOR_TRANSLATION})
+else()
+   message (STATUS "WARNING: Could not find qt linguist tools. Translation will not be included.")
+endif()
 
 target_link_libraries(administrator Qt5::Widgets
    trustbridge_common

http://wald.intevation.org/projects/trustbridge/