Skip to content

Commit

Permalink
cmake throw fatal error if BUILD_DRIVERS and Qt <6
Browse files Browse the repository at this point in the history
  • Loading branch information
silverqx committed May 3, 2024
1 parent d8acf20 commit 87f0b15
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions drivers/mysql/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 87f0b15

Please sign in to comment.