Skip to content

Commit f8585da

Browse files
committed
Require Qt 6.4 for QML because of the use of ComponentBehavior: Bound
1 parent 66f7912 commit f8585da

1 file changed

Lines changed: 36 additions & 32 deletions

File tree

CMakeLists.txt

Lines changed: 36 additions & 32 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})
@@ -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()
20101978
if(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)
24662449
endif()
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+
24682472
set_target_properties(mixxx-lib PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY}")
24692473
target_link_libraries(mixxx PRIVATE mixxx-lib mixxx-gitinfostore)
24702474

0 commit comments

Comments
 (0)