From 77ced2b7c8f199ff83131deaf47faaf99723c6db Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Wed, 29 Jul 2020 14:53:55 -0500 Subject: [PATCH] Fix Ubuntu 18.04 Qt FTBFS (#1377) * fix: avoid qt5_add_translation options on old qt5 Check the Qt5Linguist version before passing 'OPTIONS -silent' to qt5_add_translation(). 'OPTIONS' arg support was merged 2018-01-12 https://codereview.qt.nokia.com/gitweb?p=qt%2Fqttools.git;a=commit;h=9f3dba2ea3978936565aa5e7893415a8a765268e and made it into the 5.11 release on 2018-05-22. * fix: ftbfs include before using assert() --- cmake/TrMacros.cmake | 6 +++++- qt/TorrentModel.cc | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/cmake/TrMacros.cmake b/cmake/TrMacros.cmake index 5e439126f..ce7690a62 100644 --- a/cmake/TrMacros.cmake +++ b/cmake/TrMacros.cmake @@ -194,5 +194,9 @@ macro(tr_qt_add_resources) endmacro() macro(tr_qt_add_translation) - qt5_add_translation(${ARGN} OPTIONS -silent) + if (Qt5LinguistTools_VERSION VERSION_LESS 5.11.0) + qt5_add_translation(${ARGN}) + else() + qt5_add_translation(${ARGN} OPTIONS -silent) + endif() endmacro() diff --git a/qt/TorrentModel.cc b/qt/TorrentModel.cc index 5758de8fa..543ef9eab 100644 --- a/qt/TorrentModel.cc +++ b/qt/TorrentModel.cc @@ -7,6 +7,7 @@ */ #include +#include #include #include