Moving to QT6: Read more

QT6 Apparently means a lot of changes, these are the changes I've
found to make at least CPP build. The problem is we just got rid of a
lot of CPP and I don't know if the application will work. On the other
hand, the QML isn't finished yet either, but this is the start of
updating the application for QT6 and using MpvQt which is being built
and maintained by KDE. This will be better as they'll keep the library
updated for future QT updates so long as I still track with Kirigami.
This commit is contained in:
Chris Cochrun 2024-09-09 13:02:11 -05:00
parent 398bc58525
commit 61aef5c48f
13 changed files with 1115 additions and 2302 deletions

View file

@ -4,8 +4,8 @@ set(APP_NAME ${PROJECT_NAME})
include(FeatureSummary)
set(QT5_MIN_VERSION 5.15)
set(KF5_MIN_VERSION 5.83)
set(QT_MIN_VERSION 6.6.0)
set(KF_MIN_VERSION 6.00)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
@ -14,7 +14,7 @@ set(CMAKE_AUTORCC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
find_package(ECM ${KF_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
@ -27,8 +27,8 @@ include(ECMPoQmTools)
kde_enable_exceptions()
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Core Quick Test Gui QuickControls2 Widgets Sql X11Extras QmlImportScanner WebEngine)
find_package(KF5 ${KF_MIN_VERSION} REQUIRED COMPONENTS Kirigami2 CoreAddons I18n Archive)
find_package(Qt6 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Core Core5Compat Quick Test Gui Qml QuickControls2 Widgets Sql QmlImportScanner WebEngineQuick)
find_package(KF6 ${KF_MIN_VERSION} REQUIRED COMPONENTS Kirigami CoreAddons I18n)
find_package(FFmpeg)
set_package_properties(FFmpeg PROPERTIES TYPE REQUIRED)
@ -36,6 +36,10 @@ set_package_properties(FFmpeg PROPERTIES TYPE REQUIRED)
find_package(Libmpv)
set_package_properties(Libmpv PROPERTIES TYPE REQUIRED)
find_package(MpvQt)
set_package_properties(MpvQt PROPERTIES TYPE REQUIRED
URL "https://invent.kde.org/libraries/mpvqt")
find_package(YouTubeDl)
set_package_properties(YouTubeDl PROPERTIES TYPE RUNTIME)
@ -86,18 +90,17 @@ target_include_directories(${APP_NAME}_lib INTERFACE "${CXXQT_EXPORT_DIR}/${CRAT
# executable which link the Rust library, for example tests, will also link Qt.
target_link_libraries(${APP_NAME}_lib INTERFACE
"$<LINK_LIBRARY:WHOLE_ARCHIVE,${CRATE}-static>"
Qt5::Quick
Qt5::Qml
Qt5::Gui
Qt5::QuickControls2
Qt5::Widgets
Qt5::Sql
Qt5::X11Extras
Qt5::WebEngine
KF5::Kirigami2
KF5::I18n
KF5::Archive
KF5::CoreAddons
Qt6::Quick
Qt6::Qml
Qt6::Gui
Qt6::QuickControls2
Qt6::Widgets
Qt6::Sql
Qt6::WebEngineQuick
KF6::Kirigami
KF6::I18n
KF6::CoreAddons
MpvQt::MpvQt
mpv
ssl
crypto