Skip to content

Commit e861db1

Browse files
committed
Require Qt 6.5 for QML because of the use of ComponentBehavior: Bound
1 parent 4cf1609 commit e861db1

1 file changed

Lines changed: 13 additions & 12 deletions

File tree

CMakeLists.txt

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -402,14 +402,6 @@ endif()
402402
include(CMakeDependentOption)
403403

404404
option(QT6 "Build with Qt6" ON)
405-
cmake_dependent_option(
406-
QML
407-
"Build with QML"
408-
ON
409-
"QT6"
410-
OFF
411-
)
412-
413405
if(QT6)
414406
set(QOPENGL ON CACHE INTERNAL "Forced ON because QT6=ON")
415407
else()
@@ -420,10 +412,6 @@ if(QOPENGL)
420412
add_compile_definitions(MIXXX_USE_QOPENGL)
421413
endif()
422414

423-
if(QML)
424-
add_compile_definitions(MIXXX_USE_QML)
425-
endif()
426-
427415
if(VCPKG_TARGET_TRIPLET MATCHES "^wasm(32|64)-emscripten")
428416
message(STATUS "Targeting Emscripten (${VCPKG_TARGET_TRIPLET})")
429417
if(DEFINED ENV{EMSDK})
@@ -2367,6 +2355,19 @@ if(QT6)
23672355
if(NOT Qt6_FOUND)
23682356
fatal_error_missing_env()
23692357
endif()
2358+
2359+
# We need Qt 6.5 for ComponentBehavior: Bound
2360+
cmake_dependent_option(
2361+
QML
2362+
"Build with QML"
2363+
ON
2364+
"Qt6_VERSION VERSION_GREATER_EQUAL 6.5"
2365+
OFF
2366+
)
2367+
if(QML)
2368+
add_compile_definitions(MIXXX_USE_QML)
2369+
endif()
2370+
23702371
# qt_add_executable() is the recommended initial call for qt_finalize_target()
23712372
# below that takes care of the correct object order in the resulting binary
23722373
# According to https://doc.qt.io/qt-6/qt-finalize-target.html it is importand for

0 commit comments

Comments
 (0)