From 9149d1baa3e1a6bf78103a1c53af081cd2b7e145 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Fri, 11 Dec 2020 21:01:51 +0100 Subject: [PATCH] Add back mistakenly removed QT_MIN_VERSION in CMakeLists.txt --- CMakeLists.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a1f2af1e..a29565c33 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -166,6 +166,10 @@ endif() set(QT_COMPONENTS Core Concurrent Widgets Network Sql) unset(OPTIONAL_COMPONENTS) +if(QT_MAJOR_VERSION EQUAL 5) + set(QT_MIN_VERSION 5.8) +endif() + if(DBUS_FOUND) list(APPEND QT_COMPONENTS DBus) endif() @@ -176,10 +180,7 @@ if(WIN32) list(APPEND OPTIONAL_COMPONENTS WinExtras) endif() -find_package(Qt${QT_MAJOR_VERSION} REQUIRED COMPONENTS ${QT_COMPONENTS}) -if(OPTIONAL_COMPONENTS) - find_package(Qt${QT_MAJOR_VERSION} OPTIONAL_COMPONENTS ${OPTIONAL_COMPONENTS}) -endif(OPTIONAL_COMPONENTS) +find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED COMPONENTS ${QT_COMPONENTS} OPTIONAL_COMPONENTS ${OPTIONAL_COMPONENTS}) set(QtCore_LIBRARIES Qt${QT_MAJOR_VERSION}::Core) set(QtConcurrent_LIBRARIES Qt${QT_MAJOR_VERSION}::Concurrent)