diff --git a/CMakeLists.txt b/CMakeLists.txt index d2faca758df..7096abeadb8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2899,8 +2899,16 @@ if(Qt_IS_STATIC) if(WIN32) target_link_libraries(mixxx-lib PRIVATE Qt${QT_VERSION_MAJOR}::QWindowsIntegrationPlugin - Qt${QT_VERSION_MAJOR}::QWindowsVistaStylePlugin ) + if(QT_VERSION VERSION_LESS 6.7) + target_link_libraries(mixxx-lib PRIVATE + Qt${QT_VERSION_MAJOR}::QWindowsVistaStylePlugin + ) + else() + target_link_libraries(mixxx-lib PRIVATE + Qt${QT_VERSION_MAJOR}::QModernWindowsStylePlugin + ) + endif() endif() if(APPLE) @@ -3047,9 +3055,19 @@ else() install(IMPORTED_RUNTIME_ARTIFACTS Qt${QT_VERSION_MAJOR}::QWindowsIntegrationPlugin DESTINATION "${MIXXX_INSTALL_DATADIR}/platforms" COMPONENT applocal) - install(IMPORTED_RUNTIME_ARTIFACTS Qt${QT_VERSION_MAJOR}::QWindowsVistaStylePlugin - DESTINATION "${MIXXX_INSTALL_DATADIR}/styles" - COMPONENT applocal) + if(QT_VERSION VERSION_LESS 6.7) + target_link_libraries(mixxx-lib PRIVATE + install(IMPORTED_RUNTIME_ARTIFACTS Qt${QT_VERSION_MAJOR}::QWindowsVistaStylePlugin + DESTINATION "${MIXXX_INSTALL_DATADIR}/styles" + COMPONENT applocal) + ) + else() + target_link_libraries(mixxx-lib PRIVATE + install(IMPORTED_RUNTIME_ARTIFACTS Qt${QT_VERSION_MAJOR}::QModernWindowsStylePlugin + DESTINATION "${MIXXX_INSTALL_DATADIR}/styles" + COMPONENT applocal) + ) + endif() endif() if(APPLE) install(IMPORTED_RUNTIME_ARTIFACTS Qt${QT_VERSION_MAJOR}::QCocoaIntegrationPlugin diff --git a/src/mixxxapplication.cpp b/src/mixxxapplication.cpp index 76096ccd6aa..1467bf46b2a 100644 --- a/src/mixxxapplication.cpp +++ b/src/mixxxapplication.cpp @@ -29,7 +29,11 @@ Q_IMPORT_PLUGIN(QWasmIntegrationPlugin) #elif defined(Q_OS_WIN) Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin) +#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0) +Q_IMPORT_PLUGIN(QModernWindowsStylePlugin) +#else Q_IMPORT_PLUGIN(QWindowsVistaStylePlugin) +#endif #elif defined(Q_OS_IOS) Q_IMPORT_PLUGIN(QIOSIntegrationPlugin) #elif defined(Q_OS_MACOS)