Skip to content

Commit

Permalink
fix: [build] Add minimum Qt5 version requirement check
Browse files Browse the repository at this point in the history
Add explicit version check to ensure Qt5 version is at least 5.15 when building
with Qt5 interface. This prevents build failures with older Qt5 versions that
may lack required features.

The check is added right after finding Qt5Concurrent package and will fail
with a clear error message if an incompatible version is detected.
  • Loading branch information
Kakueeen authored and manisandro committed Nov 28, 2024
1 parent 5c8ec59 commit 5b166f0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,12 @@ ELSEIF("${INTERFACE_TYPE}" STREQUAL "qt5" OR "${INTERFACE_TYPE}" STREQUAL "qt6")

SET(CMAKE_AUTOMOC ON)
FIND_PACKAGE(Qt${QT_VER}Concurrent REQUIRED)
IF(${QT_VER} STREQUAL "5")
IF(Qt5Concurrent_VERSION VERSION_LESS 5.15)
MESSAGE(FATAL_ERROR "Qt5 version must be at least 5.15 (found ${Qt5Concurrent_VERSION})")
ENDIF()
ENDIF()

FIND_PACKAGE(Qt${QT_VER}DBus REQUIRED)
FIND_PACKAGE(Qt${QT_VER}Network REQUIRED)
FIND_PACKAGE(Qt${QT_VER}Widgets REQUIRED)
Expand Down

0 comments on commit 5b166f0

Please sign in to comment.