Mercurial > trustbridge
comparison ui/CMakeLists.txt @ 420:16b6d5686835
Switch to resource based loading of translations
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Wed, 16 Apr 2014 17:00:59 +0000 |
parents | 413b29f6758f |
children | 7edfc9b9b360 |
comparison
equal
deleted
inserted
replaced
411:413b29f6758f | 420:16b6d5686835 |
---|---|
110 | 110 |
111 set(ADMINSTRATOR_SOURCES_WITH_RESOURCES ${ADMINSTRATOR_SOURCES}) | 111 set(ADMINSTRATOR_SOURCES_WITH_RESOURCES ${ADMINSTRATOR_SOURCES}) |
112 qt5_add_resources(ADMINSTRATOR_SOURCES_WITH_RESOURCES ${ADMINSTRATOR_RESOURCES}) | 112 qt5_add_resources(ADMINSTRATOR_SOURCES_WITH_RESOURCES ${ADMINSTRATOR_RESOURCES}) |
113 | 113 |
114 if(Qt5LinguistTools_FOUND) | 114 if(Qt5LinguistTools_FOUND) |
115 # Include translation as a resource | |
116 # This works in the source directory to enable the rcc dependencies to be found | |
117 # and it also updates the currently available localization. | |
118 # This would probably be better placed in a macro | |
119 configure_file(l10n/administrator.qrc.in administrator.qrc) | |
120 qt5_add_resources(ADMINISTRATOR_L10N ${CMAKE_CURRENT_BINARY_DIR}/administrator.qrc) | |
115 qt5_create_translation(ADMINISTRATOR_TRANSLATION ${ADMINSTRATOR_SOURCES_WITH_RESOURCES} | 121 qt5_create_translation(ADMINISTRATOR_TRANSLATION ${ADMINSTRATOR_SOURCES_WITH_RESOURCES} |
116 ${CMAKE_CURRENT_SOURCE_DIR}/l10n/administrator.ts) | 122 ${CMAKE_CURRENT_SOURCE_DIR}/l10n/administrator_de_DE.ts) |
117 add_executable(administrator ${ADMINSTRATOR_SOURCES_WITH_RESOURCES} ${ADMINISTRATOR_TRANSLATION}) | 123 add_executable(administrator ${ADMINSTRATOR_SOURCES_WITH_RESOURCES} |
124 ${ADMINISTRATOR_L10N} | |
125 ${ADMINISTRATOR_TRANSLATION} | |
126 ) | |
118 else() | 127 else() |
119 message (STATUS "WARNING: Could not find qt linguist tools. Translation will not be included.") | 128 message (STATUS "WARNING: Could not find qt linguist tools. Translation will not be included.") |
129 add_executable(administrator ${ADMINSTRATOR_SOURCES_WITH_RESOURCES}) | |
120 endif() | 130 endif() |
121 | 131 |
122 target_link_libraries(administrator Qt5::Widgets | 132 target_link_libraries(administrator Qt5::Widgets |
123 trustbridge_common | 133 trustbridge_common |
124 ${POLARSSL_LIBRARIES} | 134 ${POLARSSL_LIBRARIES} |