Mercurial > trustbridge
diff ui/CMakeLists.txt @ 411:413b29f6758f
Add translation infrastructure and a file for the Administrator application
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Wed, 16 Apr 2014 16:05:46 +0000 |
parents | 09bb19e5e369 |
children | 16b6d5686835 |
line wrap: on
line diff
--- a/ui/CMakeLists.txt Wed Apr 16 14:19:49 2014 +0000 +++ b/ui/CMakeLists.txt Wed Apr 16 16:05:46 2014 +0000 @@ -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