Qt: Add option to force a specific version of Qt

This commit is contained in:
Vicki Pfau 2024-04-20 17:36:31 -07:00
parent 61791c91cb
commit f298c0185e
1 changed files with 7 additions and 1 deletions

View File

@ -25,7 +25,13 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(QT_LIBRARIES)
set(QT_VERSIONS 6 5)
option(FORCE_QT_VERSION "Force the used Qt version" OFF)
if(FORCE_QT_VERSION EQUAL 5 OR FORCE_QT_VERSION EQUAL 6)
set(QT_VERSIONS ${FORCE_QT_VERSION})
else()
set(QT_VERSIONS 6 5)
endif()
foreach(V ${QT_VERSIONS})
set(QT Qt${V})
set(QT_V ${V})