cmake throw fatal error if BUILD_DRIVERS and Qt <6

This commit is contained in:
silverqx
2024-05-03 17:17:41 +02:00
parent d8acf20324
commit 87f0b15c46
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -194,6 +194,9 @@ tiny_resource_and_manifest(${TinyDrivers_target}
# 'WINVER' macro redefined [-Wmacro-redefined]
# Look also to the TinyCommon for conditional WINVER definition
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
if(QT_VERSION_MAJOR LESS 6)
message(FATAL_ERROR "TinyDrivers library is not supported with Qt version <6.")
endif()
# No need to call the tiny_find_package() here as the core TinyOrm always depends on it
find_package(Qt${QT_VERSION_MAJOR} ${minQtVersion} CONFIG
REQUIRED COMPONENTS Core
+3
View File
@@ -148,6 +148,9 @@ tiny_resource_and_manifest(${TinyMySql_target}
# 'WINVER' macro redefined [-Wmacro-redefined]
# Look also to the TinyCommon for conditional WINVER definition
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
if(QT_VERSION_MAJOR LESS 6)
message(FATAL_ERROR "TinyMySql library is not supported with Qt version <6.")
endif()
# No need to call the tiny_find_package() here as the core TinyOrm always depends on it
find_package(Qt${QT_VERSION_MAJOR} ${minQtVersion} CONFIG
REQUIRED COMPONENTS Core