comparison ui/CMakeLists.txt @ 421:7edfc9b9b360

Add translation for trustbridge
author Andre Heinecke <aheinecke@intevation.de>
date Wed, 16 Apr 2014 17:05:08 +0000
parents 16b6d5686835
children d08e39b913ee
comparison
equal deleted inserted replaced
420:16b6d5686835 421:7edfc9b9b360
98 98
99 # Adding resources here in an extra variable to enable reuse of 99 # Adding resources here in an extra variable to enable reuse of
100 # TRUSTBRIDGE_SOURCES in the test subdirectory. 100 # TRUSTBRIDGE_SOURCES in the test subdirectory.
101 set(TRUSTBRIDGE_SOURCES_WITH_RESOURCES ${TRUSTBRIDGE_SOURCES}) 101 set(TRUSTBRIDGE_SOURCES_WITH_RESOURCES ${TRUSTBRIDGE_SOURCES})
102 qt5_add_resources(TRUSTBRIDGE_SOURCES_WITH_RESOURCES ${TRUSTBRIDGE_RESOURCES}) 102 qt5_add_resources(TRUSTBRIDGE_SOURCES_WITH_RESOURCES ${TRUSTBRIDGE_RESOURCES})
103 add_executable(trustbridge ${TRUSTBRIDGE_SOURCES_WITH_RESOURCES})
104
105 target_link_libraries(trustbridge Qt5::Widgets
106 trustbridge_common
107 ${POLARSSL_LIBRARIES}
108 ${EXTRA_STATIC_LIBS}
109 ${PROFILING_LIBS})
110 103
111 set(ADMINSTRATOR_SOURCES_WITH_RESOURCES ${ADMINSTRATOR_SOURCES}) 104 set(ADMINSTRATOR_SOURCES_WITH_RESOURCES ${ADMINSTRATOR_SOURCES})
112 qt5_add_resources(ADMINSTRATOR_SOURCES_WITH_RESOURCES ${ADMINSTRATOR_RESOURCES}) 105 qt5_add_resources(ADMINSTRATOR_SOURCES_WITH_RESOURCES ${ADMINSTRATOR_RESOURCES})
113 106
114 if(Qt5LinguistTools_FOUND) 107 if(Qt5LinguistTools_FOUND)
122 ${CMAKE_CURRENT_SOURCE_DIR}/l10n/administrator_de_DE.ts) 115 ${CMAKE_CURRENT_SOURCE_DIR}/l10n/administrator_de_DE.ts)
123 add_executable(administrator ${ADMINSTRATOR_SOURCES_WITH_RESOURCES} 116 add_executable(administrator ${ADMINSTRATOR_SOURCES_WITH_RESOURCES}
124 ${ADMINISTRATOR_L10N} 117 ${ADMINISTRATOR_L10N}
125 ${ADMINISTRATOR_TRANSLATION} 118 ${ADMINISTRATOR_TRANSLATION}
126 ) 119 )
120
121 configure_file(l10n/trustbridge.qrc.in trustbridge.qrc)
122 qt5_add_resources(TRUSTBRIDGE_L10N ${CMAKE_CURRENT_BINARY_DIR}/trustbridge.qrc)
123 qt5_create_translation(TRUSTBRIDGE_TRANSLATION ${TRUSTBRIDGE_SOURCES_WITH_RESOURCES}
124 ${CMAKE_CURRENT_SOURCE_DIR}/l10n/trustbridge_de_DE.ts)
125 add_executable(trustbridge ${TRUSTBRIDGE_SOURCES_WITH_RESOURCES}
126 ${TRUSTBRIDGE_L10N}
127 ${TRUSTBRIDGE_TRANSLATION}
128 )
129
127 else() 130 else()
128 message (STATUS "WARNING: Could not find qt linguist tools. Translation will not be included.") 131 message (STATUS "WARNING: Could not find qt linguist tools. Translation will not be included.")
129 add_executable(administrator ${ADMINSTRATOR_SOURCES_WITH_RESOURCES}) 132 add_executable(administrator ${ADMINSTRATOR_SOURCES_WITH_RESOURCES})
133 add_executable(trustbridge ${TRUSTBRIDGE_SOURCES_WITH_RESOURCES})
130 endif() 134 endif()
131 135
132 target_link_libraries(administrator Qt5::Widgets 136 target_link_libraries(administrator Qt5::Widgets
133 trustbridge_common 137 trustbridge_common
134 ${POLARSSL_LIBRARIES} 138 ${POLARSSL_LIBRARIES}
135 ${EXTRA_STATIC_LIBS} 139 ${EXTRA_STATIC_LIBS}
136 ${PROFILING_LIBS}) 140 ${PROFILING_LIBS})
137 141
142 target_link_libraries(trustbridge Qt5::Widgets
143 trustbridge_common
144 ${POLARSSL_LIBRARIES}
145 ${EXTRA_STATIC_LIBS}
146 ${PROFILING_LIBS})
147
148
138 # Tests 149 # Tests
139 add_subdirectory(tests) 150 add_subdirectory(tests)
140 151
141 install(TARGETS trustbridge DESTINATION bin) 152 install(TARGETS trustbridge DESTINATION bin)
142 install(TARGETS administrator DESTINATION bin) 153 install(TARGETS administrator DESTINATION bin)

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