From da2a26fa019e2bec537eb1fd773eeb0a0fb5bf33 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Sun, 20 Sep 2020 17:32:16 +0800 Subject: [PATCH] Use silent flag when invoking lrelease via cmake --- src/app/CMakeLists.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt index df995e71f..977826a09 100644 --- a/src/app/CMakeLists.txt +++ b/src/app/CMakeLists.txt @@ -4,14 +4,22 @@ # Based on https://gist.github.com/giraldeau/546ba5512a74dfe9d8ea0862d66db412 file(GLOB QBT_TS_FILES "${qBittorrent_SOURCE_DIR}/src/lang/*.ts") set_source_files_properties(${QBT_TS_FILES} PROPERTIES OUTPUT_LOCATION "${qBittorrent_BINARY_DIR}/src/lang") -qt5_add_translation(QBT_QM_FILES ${QBT_TS_FILES}) +if (Qt5_VERSION VERSION_LESS 5.12) + qt5_add_translation(QBT_QM_FILES ${QBT_TS_FILES}) +else() + qt5_add_translation(QBT_QM_FILES ${QBT_TS_FILES} OPTIONS -silent) +endif() configure_file("${qBittorrent_SOURCE_DIR}/src/lang/lang.qrc" "${qBittorrent_BINARY_DIR}/src/lang/lang.qrc" COPYONLY) if (WEBUI) file(GLOB QBT_WEBUI_TS_FILES "${qBittorrent_SOURCE_DIR}/src/webui/www/translations/*.ts") set_source_files_properties(${QBT_WEBUI_TS_FILES} PROPERTIES OUTPUT_LOCATION "${qBittorrent_BINARY_DIR}/src/webui/www/translations") - qt5_add_translation(QBT_WEBUI_QM_FILES ${QBT_WEBUI_TS_FILES}) + if (Qt5_VERSION VERSION_LESS 5.12) + qt5_add_translation(QBT_WEBUI_QM_FILES ${QBT_WEBUI_TS_FILES}) + else() + qt5_add_translation(QBT_WEBUI_QM_FILES ${QBT_WEBUI_TS_FILES} OPTIONS -silent) + endif() configure_file("${qBittorrent_SOURCE_DIR}/src/webui/www/translations/webui_translations.qrc" "${qBittorrent_BINARY_DIR}/src/webui/www/translations/webui_translations.qrc" COPYONLY) endif()