Add back mistakenly removed QT_MIN_VERSION in CMakeLists.txt
This commit is contained in:
@@ -166,6 +166,10 @@ endif()
|
|||||||
set(QT_COMPONENTS Core Concurrent Widgets Network Sql)
|
set(QT_COMPONENTS Core Concurrent Widgets Network Sql)
|
||||||
unset(OPTIONAL_COMPONENTS)
|
unset(OPTIONAL_COMPONENTS)
|
||||||
|
|
||||||
|
if(QT_MAJOR_VERSION EQUAL 5)
|
||||||
|
set(QT_MIN_VERSION 5.8)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(DBUS_FOUND)
|
if(DBUS_FOUND)
|
||||||
list(APPEND QT_COMPONENTS DBus)
|
list(APPEND QT_COMPONENTS DBus)
|
||||||
endif()
|
endif()
|
||||||
@@ -176,10 +180,7 @@ if(WIN32)
|
|||||||
list(APPEND OPTIONAL_COMPONENTS WinExtras)
|
list(APPEND OPTIONAL_COMPONENTS WinExtras)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(Qt${QT_MAJOR_VERSION} REQUIRED COMPONENTS ${QT_COMPONENTS})
|
find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED COMPONENTS ${QT_COMPONENTS} OPTIONAL_COMPONENTS ${OPTIONAL_COMPONENTS})
|
||||||
if(OPTIONAL_COMPONENTS)
|
|
||||||
find_package(Qt${QT_MAJOR_VERSION} OPTIONAL_COMPONENTS ${OPTIONAL_COMPONENTS})
|
|
||||||
endif(OPTIONAL_COMPONENTS)
|
|
||||||
|
|
||||||
set(QtCore_LIBRARIES Qt${QT_MAJOR_VERSION}::Core)
|
set(QtCore_LIBRARIES Qt${QT_MAJOR_VERSION}::Core)
|
||||||
set(QtConcurrent_LIBRARIES Qt${QT_MAJOR_VERSION}::Concurrent)
|
set(QtConcurrent_LIBRARIES Qt${QT_MAJOR_VERSION}::Concurrent)
|
||||||
|
|||||||
Reference in New Issue
Block a user