Skip to content

Commit b96862a

Browse files
committed
Build - fix for Qt 6.7
1 parent b9e20ba commit b96862a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

app/gui/qt/CMakeLists.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,13 +217,22 @@ endif()
217217

218218
# Translations: Convert the .ts files into .qm files
219219
set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION ${QTAPP_ROOT}/lang)
220+
221+
220222
if (Qt6_FOUND)
221-
qt_add_lrelease(${APP_NAME} TS_FILES ${TS_FILES})
223+
if (${Qt6Core_VERSION} VERSION_LESS "6.7.0")
224+
qt_add_lrelease(${APP_NAME} TS_FILES ${TS_FILES})
225+
else()
226+
# Qt 6.7.0 and later...
227+
set(LRELEASE_TARGET "${APP_NAME}_lrelease")
228+
qt_add_lrelease(TS_FILES ${TS_FILES} LRELEASE_TARGET ${LRELEASE_TARGET})
229+
endif()
222230
else()
223231
qt5_add_translation(QM_FILES ${TS_FILES})
224232
set_property(SOURCE ${APP_NAME} APPEND PROPERTY OBJECT_DEPENDS ${QM_FILES})
225233
endif()
226234

235+
227236
if (APPLE)
228237
set_target_properties(
229238
${APP_NAME} PROPERTIES

0 commit comments

Comments
 (0)