@@ -402,14 +402,6 @@ endif()
402402include (CMakeDependentOption )
403403
404404option (QT6 "Build with Qt6" ON )
405- cmake_dependent_option (
406- QML
407- "Build with QML"
408- ON
409- "QT6"
410- OFF
411- )
412-
413405if (QT6)
414406 set (QOPENGL ON CACHE INTERNAL "Forced ON because QT6=ON" )
415407else ()
@@ -420,10 +412,6 @@ if(QOPENGL)
420412 add_compile_definitions (MIXXX_USE_QOPENGL )
421413endif ()
422414
423- if (QML)
424- add_compile_definitions (MIXXX_USE_QML )
425- endif ()
426-
427415if (VCPKG_TARGET_TRIPLET MATCHES "^wasm(32|64)-emscripten" )
428416 message (STATUS "Targeting Emscripten (${VCPKG_TARGET_TRIPLET} )" )
429417 if (DEFINED ENV{EMSDK})
@@ -1987,26 +1975,6 @@ set(
19871975 src/util/workerthreadscheduler.h
19881976 src/util/xml.h
19891977)
1990- if (NOT QML)
1991- target_sources (
1992- mixxx-lib
1993- PRIVATE
1994- # The following sources need to be in the QML target in order to get QML_ELEMENT properly interpreted.
1995- # However, if we build Mixxx without QML support, these are still required, so it gets appended to the
1996- # main target
1997- src/control/controlmodel.cpp
1998- src/control/controlsortfiltermodel.cpp
1999- )
2000- else ()
2001- target_sources (
2002- mixxx-lib
2003- PRIVATE
2004- # The following source depends of QML being available but aren't part of the new QML UI
2005- src/controllers/rendering/controllerrenderingengine.cpp
2006- src/controllers/controllerenginethreadcontrol.cpp
2007- src/controllers/controllerscreenpreview.cpp
2008- )
2009- endif ()
20101978if (QOPENGL)
20111979 target_sources (
20121980 mixxx-lib
@@ -2366,6 +2334,21 @@ if(QT6)
23662334 if (NOT Qt6_FOUND)
23672335 fatal_error_missing_env ()
23682336 endif ()
2337+
2338+ # We need Qt 6.4 for ComponentBehavior: Bound
2339+ cmake_dependent_option (
2340+ QML
2341+ "Build with QML"
2342+ ON
2343+ "Qt6_VERSION VERSION_GREATER_EQUAL 6.4"
2344+ OFF
2345+ )
2346+ if (QML)
2347+ add_compile_definitions (MIXXX_USE_QML )
2348+ else ()
2349+ message (STATUS "Building without QML" )
2350+ endif ()
2351+
23692352 # qt_add_executable() is the recommended initial call for qt_finalize_target()
23702353 # below that takes care of the correct object order in the resulting binary
23712354 # According to https://doc.qt.io/qt-6/qt-finalize-target.html it is importand for
@@ -2465,6 +2448,27 @@ else()
24652448 add_executable (mixxx WIN32 src/main.cpp )
24662449endif ()
24672450
2451+ if (NOT QML)
2452+ target_sources (
2453+ mixxx-lib
2454+ PRIVATE
2455+ # The following sources need to be in the QML target in order to get QML_ELEMENT properly interpreted.
2456+ # However, if we build Mixxx without QML support, these are still required, so it gets appended to the
2457+ # main target
2458+ src/control/controlmodel.cpp
2459+ src/control/controlsortfiltermodel.cpp
2460+ )
2461+ else ()
2462+ target_sources (
2463+ mixxx-lib
2464+ PRIVATE
2465+ # The following source depends of QML being available but aren't part of the new QML UI
2466+ src/controllers/rendering/controllerrenderingengine.cpp
2467+ src/controllers/controllerenginethreadcontrol.cpp
2468+ src/controllers/controllerscreenpreview.cpp
2469+ )
2470+ endif ()
2471+
24682472set_target_properties (mixxx-lib PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY} " )
24692473target_link_libraries (mixxx PRIVATE mixxx-lib mixxx-gitinfostore )
24702474
0 commit comments