Skip to content

Commit 650108a

Browse files
committed
Require Qt 6.4 for QML because of the use of ComponentBehavior: Bound
1 parent 4cf1609 commit 650108a

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})
@@ -1988,26 +1976,6 @@ set(
19881976
src/util/workerthreadscheduler.h
19891977
src/util/xml.h
19901978
)
1991-
if(NOT QML)
1992-
target_sources(
1993-
mixxx-lib
1994-
PRIVATE
1995-
# The following sources need to be in the QML target in order to get QML_ELEMENT properly interpreted.
1996-
# However, if we build Mixxx without QML support, these are still required, so it gets appended to the
1997-
# main target
1998-
src/control/controlmodel.cpp
1999-
src/control/controlsortfiltermodel.cpp
2000-
)
2001-
else()
2002-
target_sources(
2003-
mixxx-lib
2004-
PRIVATE
2005-
# The following source depends of QML being available but aren't part of the new QML UI
2006-
src/controllers/rendering/controllerrenderingengine.cpp
2007-
src/controllers/controllerenginethreadcontrol.cpp
2008-
src/controllers/controllerscreenpreview.cpp
2009-
)
2010-
endif()
20111979
if(QOPENGL)
20121980
target_sources(
20131981
mixxx-lib
@@ -2367,6 +2335,21 @@ if(QT6)
23672335
if(NOT Qt6_FOUND)
23682336
fatal_error_missing_env()
23692337
endif()
2338+
2339+
# We need Qt 6.4 for ComponentBehavior: Bound
2340+
cmake_dependent_option(
2341+
QML
2342+
"Build with QML"
2343+
ON
2344+
"Qt6_VERSION VERSION_GREATER_EQUAL 6.4"
2345+
OFF
2346+
)
2347+
if(QML)
2348+
add_compile_definitions(MIXXX_USE_QML)
2349+
else()
2350+
message(STATUS "Building without QML")
2351+
endif()
2352+
23702353
# qt_add_executable() is the recommended initial call for qt_finalize_target()
23712354
# below that takes care of the correct object order in the resulting binary
23722355
# According to https://doc.qt.io/qt-6/qt-finalize-target.html it is importand for
@@ -2466,6 +2449,27 @@ else()
24662449
add_executable(mixxx WIN32 src/main.cpp)
24672450
endif()
24682451

2452+
if(NOT QML)
2453+
target_sources(
2454+
mixxx-lib
2455+
PRIVATE
2456+
# The following sources need to be in the QML target in order to get QML_ELEMENT properly interpreted.
2457+
# However, if we build Mixxx without QML support, these are still required, so it gets appended to the
2458+
# main target
2459+
src/control/controlmodel.cpp
2460+
src/control/controlsortfiltermodel.cpp
2461+
)
2462+
else()
2463+
target_sources(
2464+
mixxx-lib
2465+
PRIVATE
2466+
# The following source depends of QML being available but aren't part of the new QML UI
2467+
src/controllers/rendering/controllerrenderingengine.cpp
2468+
src/controllers/controllerenginethreadcontrol.cpp
2469+
src/controllers/controllerscreenpreview.cpp
2470+
)
2471+
endif()
2472+
24692473
set_target_properties(mixxx-lib PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY}")
24702474
target_link_libraries(mixxx PRIVATE mixxx-lib mixxx-gitinfostore)
24712475

0 commit comments

Comments
 (0)