diff --git a/CMakeLists.txt b/CMakeLists.txt index 962604dddf7..f61900c10ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2607,11 +2607,20 @@ if(QT6) find_package(QT 6.2 NAMES Qt6 COMPONENTS Core REQUIRED) list(APPEND QT_EXTRA_COMPONENTS "SvgWidgets") list(APPEND QT_EXTRA_COMPONENTS "Core5Compat") +else() + find_package(QT 5.12 NAMES Qt5 COMPONENTS Core REQUIRED) +endif() +if(QML) list(APPEND QT_EXTRA_COMPONENTS "Quick") + list(APPEND QT_EXTRA_COMPONENTS "LabsQmlModels") list(APPEND QT_EXTRA_COMPONENTS "QuickControls2") + list(APPEND QT_EXTRA_COMPONENTS "QuickControls2Impl") + list(APPEND QT_EXTRA_COMPONENTS "QuickLayouts") + list(APPEND QT_EXTRA_COMPONENTS "QuickShapesPrivate") + list(APPEND QT_EXTRA_COMPONENTS "QuickTemplates2") list(APPEND QT_EXTRA_COMPONENTS "QuickWidgets") -else() - find_package(QT 5.12 NAMES Qt5 COMPONENTS Core REQUIRED) + list(APPEND QT_EXTRA_COMPONENTS "QmlWorkerScript") + list(APPEND QT_EXTRA_COMPONENTS "ShaderTools") endif() find_package(Qt${QT_VERSION_MAJOR} COMPONENTS @@ -2709,6 +2718,14 @@ if(QML) # qt_finalize_target takes care that the resources :/mixxx.org/imports/Mixxx/ # and :/mixxx.org/imports/Mixxx/Controls are placed into beginning of the binary qt_finalize_target(mixxx) + + install( + DIRECTORY + "${CMAKE_CURRENT_SOURCE_DIR}/res/qml" + DESTINATION + "${MIXXX_INSTALL_DATADIR}" + ) + endif() option(DEBUG_ASSERTIONS_FATAL "Fail if debug become true assertions" OFF) @@ -2797,6 +2814,103 @@ else() DESTINATION "${MIXXX_INSTALL_DATADIR}/sqldrivers" COMPONENT applocal) + if(QML) + install(IMPORTED_RUNTIME_ARTIFACTS + Qt${QT_VERSION_MAJOR}::LabsQmlModels + DESTINATION "${MIXXX_INSTALL_DATADIR}" + COMPONENT applocal) + + install(IMPORTED_RUNTIME_ARTIFACTS + Qt${QT_VERSION_MAJOR}::QuickControls2 + DESTINATION "${MIXXX_INSTALL_DATADIR}" + COMPONENT applocal) + + install(IMPORTED_RUNTIME_ARTIFACTS + Qt${QT_VERSION_MAJOR}::QuickControls2Impl + DESTINATION "${MIXXX_INSTALL_DATADIR}" + COMPONENT applocal) + + install(IMPORTED_RUNTIME_ARTIFACTS + Qt${QT_VERSION_MAJOR}::QuickLayouts + DESTINATION "${MIXXX_INSTALL_DATADIR}" + COMPONENT applocal) + + install(IMPORTED_RUNTIME_ARTIFACTS + Qt${QT_VERSION_MAJOR}::QuickShapesPrivate + DESTINATION "${MIXXX_INSTALL_DATADIR}" + COMPONENT applocal) + + install(IMPORTED_RUNTIME_ARTIFACTS + Qt${QT_VERSION_MAJOR}::QuickTemplates2 + DESTINATION "${MIXXX_INSTALL_DATADIR}" + COMPONENT applocal) + + install(IMPORTED_RUNTIME_ARTIFACTS + Qt${QT_VERSION_MAJOR}::QmlWorkerScript + DESTINATION "${MIXXX_INSTALL_DATADIR}" + COMPONENT applocal) + + install(IMPORTED_RUNTIME_ARTIFACTS + Qt${QT_VERSION_MAJOR}::ShaderTools + DESTINATION "${MIXXX_INSTALL_DATADIR}" + COMPONENT applocal) + + #install qml6-module-qt5compat-graphicaleffects + install( + DIRECTORY "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$:/debug>/Qt6/qml/Qt5Compat/GraphicalEffects" + DESTINATION "${MIXXX_INSTALL_DATADIR}/Qt6/qml/Qt5Compat" + COMPONENT applocal) + + # install qml6-module-qtqml-workerscript + install( + DIRECTORY "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$:/debug>/Qt6/qml/QtQml/WorkerScript" + DESTINATION "${MIXXX_INSTALL_DATADIR}/Qt6/qml/QtQml" + COMPONENT applocal) + + # install qml6-module-qtquick-controls + install( + DIRECTORY "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$:/debug>/Qt6/qml/QtQuick/Controls" + DESTINATION "${MIXXX_INSTALL_DATADIR}/Qt6/qml/QtQuick" + COMPONENT applocal) + + # install qml6-module-qtquick-layouts + install( + DIRECTORY "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$:/debug>/Qt6/qml/QtQuick/Layouts" + DESTINATION "${MIXXX_INSTALL_DATADIR}/Qt6/qml/QtQuick" + COMPONENT applocal) + + # install qml6-module-qtquick-nativestyle + install( + DIRECTORY "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$:/debug>/Qt6/qml/QtQuick/NativeStyle" + DESTINATION "${MIXXX_INSTALL_DATADIR}/Qt6/qml/QtQuick" + COMPONENT applocal) + + # install qml6-module-qtquick-shapes + install( + DIRECTORY "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$:/debug>/Qt6/qml/QtQuick/Shapes" + DESTINATION "${MIXXX_INSTALL_DATADIR}/Qt6/qml/QtQuick" + COMPONENT applocal) + + # install qml6-module-qtquick-templates + install( + DIRECTORY "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$:/debug>/Qt6/qml/QtQuick/Templates" + DESTINATION "${MIXXX_INSTALL_DATADIR}/Qt6/qml/QtQuick" + COMPONENT applocal) + + # qml6-module-qtquick-window + install( + DIRECTORY "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$:/debug>/Qt6/qml/QtQuick/Window" + DESTINATION "${MIXXX_INSTALL_DATADIR}/Qt6/qml/QtQuick" + COMPONENT applocal) + + # install qml6-module-qt-labs-qmlmodels + install( + DIRECTORY "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$:/debug>/Qt6/qml/Qt/labs/qmlmodels" + DESTINATION "${MIXXX_INSTALL_DATADIR}/Qt6/qml/Qt/labs" + COMPONENT applocal) + + endif() + if(WIN32) install(IMPORTED_RUNTIME_ARTIFACTS Qt${QT_VERSION_MAJOR}::QWindowsIntegrationPlugin DESTINATION "${MIXXX_INSTALL_DATADIR}/platforms" @@ -2814,9 +2928,7 @@ else() COMPONENT applocal) endif() - add_custom_command( - TARGET mixxx POST_BUILD - COMMAND "${CMAKE_COMMAND}" -DCOMPONENT=applocal -DCMAKE_INSTALL_PREFIX="${CMAKE_CURRENT_BINARY_DIR}" -P cmake_install.cmake) + set(APPLOCAL_COMPONENT_DEFINED true) endif() endif() @@ -3589,8 +3701,22 @@ set(CPACK_DEBIAN_PACKAGE_SECTION "sound") set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional") set(CPACK_DEBIAN_PACKAGE_SUGGESTS "pdf-viewer, pulseaudio-utils") set(CPACK_DEBIAN_PACKAGE_REPLACES "mixxx-data") -set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt5sql5-sqlite, fonts-open-sans, fonts-ubuntu,\ - qml-module-qtquick-controls, qml-module-qtquick-controls2, qml-module-qt-labs-qmlmodels, qml-module-qtquick-shapes, qt6-qpa-plugins") +if(QT6) + if(QML) + set(CPACK_DEBIAN_PACKAGE_DEPENDS + "libqt6sql6-sqlite, fonts-open-sans, fonts-ubuntu, qt6-qpa-plugins,\ + qml6-module-qt5compat-graphicaleffects, qml6-module-qtquick-controls, qml6-module-qtquick-layouts, qml6-module-qtquick-nativestyle, qml6-module-qtquick-templates, qml6-module-qtquick-window, qml6-module-qt-labs-qmlmodels, qml6-module-qtquick-shapes, qml6-module-qtqml-workerscript") + else() + set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt6sql6-sqlite, fonts-open-sans, fonts-ubuntu, qt6-qpa-plugins") + endif() +else() + if(QML) + set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt5sql5-sqlite, fonts-open-sans, fonts-ubuntu,\ + qml-module-qtquick-controls, qml-module-qtquick-controls2, qml-module-qt-labs-qmlmodels, qml-module-qtquick-shapes") + else() + set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt5sql5-sqlite, fonts-open-sans, fonts-ubuntu") + endif() +endif() set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "${CPACK_PACKAGE_HOMEPAGE_URL}") set(CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION TRUE) diff --git a/packaging/debian/control.in b/packaging/debian/control.in index 15162384960..b7f3ec5c46c 100644 --- a/packaging/debian/control.in +++ b/packaging/debian/control.in @@ -9,15 +9,12 @@ Build-Depends: debhelper (>= 11), markdown, libglu1-mesa-dev, qtkeychain-qt6-dev, - qt6-declarative-dev, + qt6-declarative-private-dev, + qt6-base-private-dev, libqt6core5compat6-dev, libqt6opengl6-dev, libqt6sql6-sqlite, libqt6svg6-dev, - qml-module-qtquick-controls, - qml-module-qtquick-controls2, - qml-module-qt-labs-qmlmodels, - qml-module-qtquick-shapes, cmake (>= 3.13), libjack-dev, portaudio19-dev, diff --git a/tools/debian_buildenv.sh b/tools/debian_buildenv.sh index 2c1c79750eb..a23af3a9e68 100755 --- a/tools/debian_buildenv.sh +++ b/tools/debian_buildenv.sh @@ -81,6 +81,7 @@ case "$1" in libprotobuf-dev \ libqt6core5compat6-dev\ libqt6opengl6-dev \ + libqt6shadertools6-dev \ libqt6sql6-sqlite \ libqt6svg6-dev \ librubberband-dev \ @@ -99,11 +100,18 @@ case "$1" in portaudio19-dev \ protobuf-compiler \ qtkeychain-qt6-dev \ - qt6-declarative-dev \ - qml-module-qtquick-controls \ - qml-module-qtquick-controls2 \ - qml-module-qt-labs-qmlmodels \ - qml-module-qtquick-shapes \ + qt6-declarative-private-dev \ + qt6-base-private-dev \ + qt6-qpa-plugins \ + qml6-module-qt5compat-graphicaleffects \ + qml6-module-qtqml-workerscript \ + qml6-module-qtquick-controls \ + qml6-module-qtquick-layouts \ + qml6-module-qtquick-nativestyle \ + qml6-module-qtquick-shapes \ + qml6-module-qtquick-templates \ + qml6-module-qtquick-window \ + qml6-module-qt-labs-qmlmodels \ "${PACKAGES_EXTRA[@]}" ;; *)