diff --git a/CMakeLists.txt b/CMakeLists.txt index f923b903d..16f8b9caf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,15 +48,15 @@ target_include_directories(kdeconnectversion INTERFACE ${CMAKE_CURRENT_BINARY_DI set(KF5_REQUIRED_COMPONENTS I18n ConfigWidgets DBusAddons IconThemes Notifications KIO KCMUtils Service Solid Kirigami People WindowSystem GuiAddons DocTools) -set_package_properties(KF${QT_MAJOR_VERSION}Kirigami2 PROPERTIES +set_package_properties(KF6Kirigami2 PROPERTIES DESCRIPTION "QtQuick plugins to build user interfaces based on KDE UX guidelines" PURPOSE "Required for KDE Connect's QML-based GUI applications" URL "https://www.kde.org/products/kirigami/" TYPE RUNTIME ) -find_package(KF${QT_MAJOR_VERSION}KirigamiAddons 0.11 REQUIRED) -set_package_properties(KF${QT_MAJOR_VERSION}KirigamiAddons PROPERTIES +find_package(KF6KirigamiAddons 0.11 REQUIRED) +set_package_properties(KF6KirigamiAddons PROPERTIES TYPE REQUIRED PURPOSE "Required runtime dependency (all the modules are required)" ) @@ -70,13 +70,13 @@ else() endif() if(UNIX AND NOT APPLE) - find_package(KF${QT_MAJOR_VERSION}Package REQUIRED) + find_package(KF6Package REQUIRED) if (WITH_PULSEAUDIO) - find_package(KF${QT_MAJOR_VERSION}PulseAudioQt REQUIRED) + find_package(KF6PulseAudioQt REQUIRED) endif() find_package(QtWaylandScanner REQUIRED) find_package(Wayland 1.9 REQUIRED Client) - find_package(Qt${QT_MAJOR_VERSION} REQUIRED COMPONENTS WaylandClient) + find_package(Qt6 REQUIRED COMPONENTS WaylandClient) find_package(WaylandProtocols REQUIRED) pkg_check_modules(XkbCommon IMPORTED_TARGET xkbcommon) find_package(PkgConfig QUIET REQUIRED) @@ -90,7 +90,7 @@ set_package_properties(KF5PeopleVCard PROPERTIES TYPE RUNTIME ) -if (QT_MAJOR_VERSION STREQUAL "6" AND NOT WIN32) +if (NOT WIN32) find_package(KF6StatusNotifierItem ${KF_MIN_VERSION} REQUIRED) endif() @@ -99,11 +99,8 @@ ecm_find_qmlmodule(QtQuick.Particles 2.0) add_definitions(-DQT_NO_URL_CAST_FROM_STRING -DQT_NO_KEYWORDS -DQT_NO_CAST_FROM_ASCII) -find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED COMPONENTS DBus Quick QuickControls2 Network Multimedia) -if (UNIX AND NOT APPLE AND QT_MAJOR_VERSION EQUAL "5") - find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS X11Extras) -endif() -find_package(KF${QT_MAJOR_VERSION} ${KF_MIN_VERSION} REQUIRED COMPONENTS ${KF5_REQUIRED_COMPONENTS}) +find_package(Qt6 ${QT_MIN_VERSION} REQUIRED COMPONENTS DBus Quick QuickControls2 Network Multimedia) +find_package(KF6 ${KF_MIN_VERSION} REQUIRED COMPONENTS ${KF5_REQUIRED_COMPONENTS}) if (WIN32) get_filename_component(WINDOWS_KITS_DIR @@ -118,8 +115,8 @@ add_subdirectory(core) add_subdirectory(plugins) add_subdirectory(interfaces) -find_package(KF${QT_MAJOR_VERSION}QQC2DesktopStyle ${KF_MIN_VERSION} REQUIRED) -set_package_properties(KF${QT_MAJOR_VERSION}QQC2DesktopStyle PROPERTIES TYPE RUNTIME) +find_package(KF6QQC2DesktopStyle ${KF_MIN_VERSION} REQUIRED) +set_package_properties(KF6QQC2DesktopStyle PROPERTIES TYPE RUNTIME) add_subdirectory(icons) add_subdirectory(data) diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 80cef5142..12437a6de 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -46,7 +46,7 @@ ecm_target_qml_sources(kdeconnect-app SOURCES qml/Settings.qml ) -target_link_libraries(kdeconnect-app PRIVATE Qt::Quick Qt::QuickControls2 Qt::Widgets KF${QT_MAJOR_VERSION}::CoreAddons KF${QT_MAJOR_VERSION}::I18n KF${QT_MAJOR_VERSION}::KCMUtils) +target_link_libraries(kdeconnect-app PRIVATE Qt::Quick Qt::QuickControls2 Qt::Widgets KF6::CoreAddons KF6::I18n KF6::KCMUtils) install(TARGETS kdeconnect-app ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) install(PROGRAMS org.kde.kdeconnect.app.desktop DESTINATION ${KDE_INSTALL_APPDIR}) diff --git a/cli/CMakeLists.txt b/cli/CMakeLists.txt index 07384be57..9adab6fb5 100644 --- a/cli/CMakeLists.txt +++ b/cli/CMakeLists.txt @@ -7,8 +7,8 @@ target_link_libraries(kdeconnect-cli kdeconnectinterfaces kdeconnectcore kdeconnectversion - KF${QT_MAJOR_VERSION}::CoreAddons - KF${QT_MAJOR_VERSION}::I18n + KF6::CoreAddons + KF6::I18n ) install(TARGETS kdeconnect-cli ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index ef079aa18..613c738d7 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -14,7 +14,7 @@ add_subdirectory(backends/loopback) option(BLUETOOTH_ENABLED "Bluetooth support for kdeconnect" ON) if(BLUETOOTH_ENABLED) - find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED COMPONENTS Bluetooth) + find_package(Qt6 ${QT_MIN_VERSION} REQUIRED COMPONENTS Bluetooth) add_subdirectory(backends/bluetooth) endif() @@ -58,14 +58,14 @@ find_package(OpenSSL REQUIRED COMPONENTS Crypto) target_link_libraries(kdeconnectcore PUBLIC Qt::Network - KF${QT_MAJOR_VERSION}::CoreAddons - KF${QT_MAJOR_VERSION}::KIOCore - KF${QT_MAJOR_VERSION}::KIOGui + KF6::CoreAddons + KF6::KIOCore + KF6::KIOGui OpenSSL::Crypto PRIVATE Qt::DBus - KF${QT_MAJOR_VERSION}::I18n - KF${QT_MAJOR_VERSION}::ConfigCore + KF6::I18n + KF6::ConfigCore ) if(WIN32) @@ -74,7 +74,7 @@ endif() if (BLUETOOTH_ENABLED) target_compile_definitions(kdeconnectcore PRIVATE -DKDECONNECT_BLUETOOTH) - target_link_libraries(kdeconnectcore PRIVATE Qt${QT_MAJOR_VERSION}::Bluetooth) + target_link_libraries(kdeconnectcore PRIVATE Qt6::Bluetooth) endif() if (LOOPBACK_ENABLED) diff --git a/daemon/CMakeLists.txt b/daemon/CMakeLists.txt index 7a872bcfe..1cc74d163 100644 --- a/daemon/CMakeLists.txt +++ b/daemon/CMakeLists.txt @@ -8,11 +8,11 @@ ecm_qt_declare_logging_category(kdeconnectd EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (daemon)") target_link_libraries(kdeconnectd kdeconnectcore kdeconnectversion - KF${QT_MAJOR_VERSION}::KIOWidgets - KF${QT_MAJOR_VERSION}::DBusAddons - KF${QT_MAJOR_VERSION}::Notifications - KF${QT_MAJOR_VERSION}::I18n - KF${QT_MAJOR_VERSION}::WindowSystem + KF6::KIOWidgets + KF6::DBusAddons + KF6::Notifications + KF6::I18n + KF6::WindowSystem Qt::Widgets) ecm_mark_nongui_executable(kdeconnectd) diff --git a/declarativeplugin/CMakeLists.txt b/declarativeplugin/CMakeLists.txt index f5b9334a3..49092b241 100644 --- a/declarativeplugin/CMakeLists.txt +++ b/declarativeplugin/CMakeLists.txt @@ -15,22 +15,10 @@ ecm_target_qml_sources(kdeconnectdeclarativeplugin VERSION 1.0) if(UNIX AND NOT APPLE) - - if (QT_MAJOR_VERSION EQUAL "5") - ecm_add_qtwayland_client_protocol(wayland_SRCS - PROTOCOL ${WaylandProtocols_DATADIR}/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml - BASENAME pointer-constraints-unstable-v1 - ) - ecm_add_qtwayland_client_protocol(wayland_SRCS - PROTOCOL ${WaylandProtocols_DATADIR}/unstable/relative-pointer/relative-pointer-unstable-v1.xml - BASENAME relative-pointer-unstable-v1 - ) - else() - qt6_generate_wayland_protocol_client_sources(kdeconnectdeclarativeplugin FILES - ${WaylandProtocols_DATADIR}/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml) - qt6_generate_wayland_protocol_client_sources(kdeconnectdeclarativeplugin FILES - ${WaylandProtocols_DATADIR}/unstable/relative-pointer/relative-pointer-unstable-v1.xml) - endif() + qt6_generate_wayland_protocol_client_sources(kdeconnectdeclarativeplugin FILES + ${WaylandProtocols_DATADIR}/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml) + qt6_generate_wayland_protocol_client_sources(kdeconnectdeclarativeplugin FILES + ${WaylandProtocols_DATADIR}/unstable/relative-pointer/relative-pointer-unstable-v1.xml) target_sources(kdeconnectdeclarativeplugin PRIVATE ${wayland_SRCS}) target_link_libraries(kdeconnectdeclarativeplugin PRIVATE Wayland::Client Qt::WaylandClient Qt::GuiPrivate) diff --git a/fileitemactionplugin/CMakeLists.txt b/fileitemactionplugin/CMakeLists.txt index 2079b2b0b..ac63b74f1 100644 --- a/fileitemactionplugin/CMakeLists.txt +++ b/fileitemactionplugin/CMakeLists.txt @@ -9,9 +9,9 @@ ecm_qt_declare_logging_category(kdeconnectfileitemaction EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (fileitemaction)") target_link_libraries( kdeconnectfileitemaction - KF${QT_MAJOR_VERSION}::KIOWidgets - KF${QT_MAJOR_VERSION}::I18n + KF6::KIOWidgets + KF6::I18n kdeconnectinterfaces kdeconnectcore ) -install(TARGETS kdeconnectfileitemaction DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf${QT_MAJOR_VERSION}/kfileitemaction) +install(TARGETS kdeconnectfileitemaction DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf6/kfileitemaction) diff --git a/indicator/CMakeLists.txt b/indicator/CMakeLists.txt index 99999e027..0e844b492 100644 --- a/indicator/CMakeLists.txt +++ b/indicator/CMakeLists.txt @@ -43,13 +43,11 @@ ecm_qt_declare_logging_category(kdeconnect-indicator target_include_directories(kdeconnect-indicator PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/systray_actions) -target_link_libraries(kdeconnect-indicator Qt::Widgets KF${QT_MAJOR_VERSION}::CoreAddons KF${QT_MAJOR_VERSION}::I18n KF${QT_MAJOR_VERSION}::Notifications KF${QT_MAJOR_VERSION}::DBusAddons KF${QT_MAJOR_VERSION}::KCMUtils kdeconnectinterfaces kdeconnectcore kdeconnectversion) +target_link_libraries(kdeconnect-indicator Qt::Widgets KF6::CoreAddons KF6::I18n KF6::Notifications KF6::DBusAddons KF6::KCMUtils kdeconnectinterfaces kdeconnectcore kdeconnectversion) if (WIN32) target_link_libraries(kdeconnect-indicator windowsapp) -endif() - -if (QT_MAJOR_VERSION STREQUAL "6" AND NOT WIN32) +else() target_link_libraries(kdeconnect-indicator KF6::StatusNotifierItem) endif() diff --git a/interfaces/CMakeLists.txt b/interfaces/CMakeLists.txt index 4eb67f539..da6a9dd36 100644 --- a/interfaces/CMakeLists.txt +++ b/interfaces/CMakeLists.txt @@ -102,12 +102,12 @@ target_link_libraries(kdeconnectinterfaces LINK_PUBLIC Qt::Gui Qt::DBus - KF${QT_MAJOR_VERSION}::ConfigCore + KF6::ConfigCore LINK_PRIVATE kdeconnectcore - KF${QT_MAJOR_VERSION}::I18n + KF6::I18n kdeconnectcore - KF${QT_MAJOR_VERSION}::CoreAddons + KF6::CoreAddons ) install(TARGETS kdeconnectinterfaces EXPORT kdeconnectLibraryTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP) diff --git a/kcm/CMakeLists.txt b/kcm/CMakeLists.txt index 44fee9dda..690cc2e24 100644 --- a/kcm/CMakeLists.txt +++ b/kcm/CMakeLists.txt @@ -9,8 +9,8 @@ ki18n_wrap_ui(kcm_kdeconnect kcm.ui) target_link_libraries(kcm_kdeconnect Qt::Core Qt::Gui - KF${QT_MAJOR_VERSION}::I18n - KF${QT_MAJOR_VERSION}::KCMUtils + KF6::I18n + KF6::KCMUtils kdeconnectinterfaces kdeconnectversion ) diff --git a/kcmplugin/CMakeLists.txt b/kcmplugin/CMakeLists.txt index 8646233a6..cac362b27 100644 --- a/kcmplugin/CMakeLists.txt +++ b/kcmplugin/CMakeLists.txt @@ -4,12 +4,12 @@ add_library(kdeconnectpluginkcm kdeconnectpluginkcm.cpp) target_link_libraries(kdeconnectpluginkcm PUBLIC kdeconnectcore - KF${QT_MAJOR_VERSION}::KCMUtils + KF6::KCMUtils PRIVATE Qt::DBus Qt::Gui - KF${QT_MAJOR_VERSION}::I18n - KF${QT_MAJOR_VERSION}::ConfigCore + KF6::I18n + KF6::ConfigCore ) set_target_properties(kdeconnectpluginkcm PROPERTIES diff --git a/kio/CMakeLists.txt b/kio/CMakeLists.txt index 3c435311c..1787081af 100644 --- a/kio/CMakeLists.txt +++ b/kio/CMakeLists.txt @@ -1,6 +1,6 @@ add_definitions(-DTRANSLATION_DOMAIN="kdeconnect-kio") -kcoreaddons_add_plugin(kio_kdeconnect SOURCES kiokdeconnect.cpp INSTALL_NAMESPACE "kf${QT_MAJOR_VERSION}/kio") +kcoreaddons_add_plugin(kio_kdeconnect SOURCES kiokdeconnect.cpp INSTALL_NAMESPACE "kf6/kio") set_target_properties(kio_kdeconnect PROPERTIES OUTPUT_NAME "kdeconnect") ecm_qt_declare_logging_category(kio_kdeconnect @@ -14,6 +14,6 @@ target_link_libraries(kio_kdeconnect kdeconnectinterfaces Qt::Core Qt::Network - KF${QT_MAJOR_VERSION}::KIOCore - KF${QT_MAJOR_VERSION}::I18n + KF6::KIOCore + KF6::I18n ) diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 1f6ad20b4..83a3856de 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -39,8 +39,8 @@ add_subdirectory(screensaver-inhibit) add_subdirectory(virtualmonitor) if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") - find_package(KF${QT_MAJOR_VERSION}ModemManagerQt ${KF_MIN_VERSION}) - if (TARGET KF${QT_MAJOR_VERSION}::ModemManagerQt) + find_package(KF6ModemManagerQt ${KF_MIN_VERSION}) + if (TARGET KF6::ModemManagerQt) add_subdirectory(mmtelephony) endif() endif() diff --git a/plugins/battery/CMakeLists.txt b/plugins/battery/CMakeLists.txt index 593a90aad..2546461fe 100644 --- a/plugins/battery/CMakeLists.txt +++ b/plugins/battery/CMakeLists.txt @@ -2,6 +2,6 @@ kdeconnect_add_plugin(kdeconnect_battery SOURCES batteryplugin.cpp) target_link_libraries(kdeconnect_battery kdeconnectcore Qt::DBus - KF${QT_MAJOR_VERSION}::Solid - KF${QT_MAJOR_VERSION}::I18n + KF6::Solid + KF6::I18n ) diff --git a/plugins/bigscreen/CMakeLists.txt b/plugins/bigscreen/CMakeLists.txt index 01ca718f2..48545af25 100644 --- a/plugins/bigscreen/CMakeLists.txt +++ b/plugins/bigscreen/CMakeLists.txt @@ -3,4 +3,4 @@ target_link_libraries(kdeconnect_bigscreen kdeconnectcore kdeconnectinterfaces Qt::DBus - KF${QT_MAJOR_VERSION}::I18n) + KF6::I18n) diff --git a/plugins/clipboard/CMakeLists.txt b/plugins/clipboard/CMakeLists.txt index 86874c2c6..55db55764 100644 --- a/plugins/clipboard/CMakeLists.txt +++ b/plugins/clipboard/CMakeLists.txt @@ -2,7 +2,7 @@ kdeconnect_add_plugin(kdeconnect_clipboard SOURCES clipboardplugin.cpp clipboard target_link_libraries(kdeconnect_clipboard kdeconnectcore Qt::DBus - KF${QT_MAJOR_VERSION}::GuiAddons + KF6::GuiAddons ${kdeconnect_clipboard_WL_LINK_LIBS} ) @@ -11,6 +11,6 @@ ki18n_wrap_ui(kdeconnect_clipboard_config clipboard_config.ui) target_link_libraries(kdeconnect_clipboard_config kdeconnectcore kdeconnectpluginkcm - KF${QT_MAJOR_VERSION}::I18n - KF${QT_MAJOR_VERSION}::KCMUtils + KF6::I18n + KF6::KCMUtils ) diff --git a/plugins/connectivity-report/CMakeLists.txt b/plugins/connectivity-report/CMakeLists.txt index e85310d0c..24206d896 100644 --- a/plugins/connectivity-report/CMakeLists.txt +++ b/plugins/connectivity-report/CMakeLists.txt @@ -2,6 +2,6 @@ kdeconnect_add_plugin(kdeconnect_connectivity_report SOURCES connectivity_report target_link_libraries(kdeconnect_connectivity_report kdeconnectcore Qt::DBus - KF${QT_MAJOR_VERSION}::Solid - KF${QT_MAJOR_VERSION}::I18n + KF6::Solid + KF6::I18n ) diff --git a/plugins/findthisdevice/CMakeLists.txt b/plugins/findthisdevice/CMakeLists.txt index 772ffaa3f..9d204b2f3 100644 --- a/plugins/findthisdevice/CMakeLists.txt +++ b/plugins/findthisdevice/CMakeLists.txt @@ -9,7 +9,7 @@ target_link_libraries(kdeconnect_findthisdevice if (NOT WIN32) target_link_libraries(kdeconnect_findthisdevice - KF${QT_MAJOR_VERSION}::PulseAudioQt + KF6::PulseAudioQt ) endif() @@ -19,8 +19,8 @@ ki18n_wrap_ui(kdeconnect_findthisdevice_config findthisdevice_config.ui) target_link_libraries(kdeconnect_findthisdevice_config kdeconnectpluginkcm Qt::Multimedia - KF${QT_MAJOR_VERSION}::I18n - KF${QT_MAJOR_VERSION}::CoreAddons - KF${QT_MAJOR_VERSION}::ConfigWidgets - KF${QT_MAJOR_VERSION}::KIOWidgets # KUrlRequester + KF6::I18n + KF6::CoreAddons + KF6::ConfigWidgets + KF6::KIOWidgets # KUrlRequester ) diff --git a/plugins/lockdevice/CMakeLists.txt b/plugins/lockdevice/CMakeLists.txt index 1d9b668b3..4de7d5080 100644 --- a/plugins/lockdevice/CMakeLists.txt +++ b/plugins/lockdevice/CMakeLists.txt @@ -9,5 +9,5 @@ target_link_libraries(kdeconnect_lockdevice kdeconnectcore kdeconnectinterfaces Qt::DBus - KF${QT_MAJOR_VERSION}::I18n + KF6::I18n ) diff --git a/plugins/mmtelephony/CMakeLists.txt b/plugins/mmtelephony/CMakeLists.txt index f9b84c52a..51a51ee90 100644 --- a/plugins/mmtelephony/CMakeLists.txt +++ b/plugins/mmtelephony/CMakeLists.txt @@ -2,6 +2,6 @@ kdeconnect_add_plugin(kdeconnect_mmtelephony SOURCES mmtelephonyplugin.cpp) target_link_libraries(kdeconnect_mmtelephony kdeconnectcore Qt::DBus - KF${QT_MAJOR_VERSION}::ModemManagerQt - KF${QT_MAJOR_VERSION}::I18n + KF6::ModemManagerQt + KF6::I18n ) diff --git a/plugins/mousepad/CMakeLists.txt b/plugins/mousepad/CMakeLists.txt index 915b4c8a4..20230c766 100644 --- a/plugins/mousepad/CMakeLists.txt +++ b/plugins/mousepad/CMakeLists.txt @@ -13,9 +13,6 @@ if(UNIX AND NOT APPLE) PURPOSE "Needed for the remote mouse input plugin" ) - if (QT_MAJOR_VERSION EQUAL "5") - find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS X11Extras) - endif() find_package(XTest REQUIRED) find_package(X11 REQUIRED) target_include_directories(kdeconnect_mousepad PRIVATE ${XTEST_INCLUDE_DIRS} ${X11_INCLUDE_DIR} ${LibFakeKey_INCLUDE_DIRS}) @@ -24,7 +21,7 @@ endif() configure_file(config-mousepad.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-mousepad.h) -target_link_libraries(kdeconnect_mousepad kdeconnectcore kdeconnectinterfaces Qt::Gui KF${QT_MAJOR_VERSION}::I18n) +target_link_libraries(kdeconnect_mousepad kdeconnectcore kdeconnectinterfaces Qt::Gui KF6::I18n) if (WIN32) target_sources(kdeconnect_mousepad PUBLIC windowsremoteinput.cpp) @@ -32,12 +29,7 @@ endif() if(WITH_X11) target_sources(kdeconnect_mousepad PUBLIC x11remoteinput.cpp) - if (QT_MAJOR_VERSION EQUAL "5") - target_link_libraries(kdeconnect_mousepad Qt5::X11Extras) - elseif(QT_MAJOR_VERSION EQUAL "6") - target_link_libraries(kdeconnect_mousepad Qt6::GuiPrivate) - endif() - target_link_libraries(kdeconnect_mousepad ${X11_LIBRARIES} ${XTEST_LIBRARIES} ${LibFakeKey_LIBRARIES}) + target_link_libraries(kdeconnect_mousepad Qt6::GuiPrivate ${X11_LIBRARIES} ${XTEST_LIBRARIES} ${LibFakeKey_LIBRARIES}) endif() if (APPLE) diff --git a/plugins/mpriscontrol/CMakeLists.txt b/plugins/mpriscontrol/CMakeLists.txt index b07fb2319..1ceef28c1 100644 --- a/plugins/mpriscontrol/CMakeLists.txt +++ b/plugins/mpriscontrol/CMakeLists.txt @@ -11,7 +11,7 @@ endif() kdeconnect_add_plugin(kdeconnect_mpriscontrol SOURCES ${kdeconnect_mpriscontrol_SRCS}) if(WIN32) - target_link_libraries(kdeconnect_mpriscontrol kdeconnectcore windowsapp KF${QT_MAJOR_VERSION}::I18n) + target_link_libraries(kdeconnect_mpriscontrol kdeconnectcore windowsapp KF6::I18n) else() target_link_libraries(kdeconnect_mpriscontrol Qt::DBus kdeconnectcore kdeconnectinterfaces) endif() diff --git a/plugins/notifications/CMakeLists.txt b/plugins/notifications/CMakeLists.txt index 5070e8234..3d27b89fe 100644 --- a/plugins/notifications/CMakeLists.txt +++ b/plugins/notifications/CMakeLists.txt @@ -5,15 +5,11 @@ target_link_libraries(kdeconnect_notifications kdeconnectcore Qt::DBus Qt::Widgets - KF${QT_MAJOR_VERSION}::Notifications - KF${QT_MAJOR_VERSION}::I18n - KF${QT_MAJOR_VERSION}::WindowSystem + KF6::Notifications + KF6::I18n + KF6::WindowSystem ) if (UNIX AND NOT APPLE) - if (QT_MAJOR_VERSION EQUAL "5") - target_link_libraries(kdeconnect_notifications Qt5::X11Extras) - else() - target_link_libraries(kdeconnect_notifications Qt6::GuiPrivate) - endif() + target_link_libraries(kdeconnect_notifications Qt6::GuiPrivate) endif() diff --git a/plugins/pausemusic/CMakeLists.txt b/plugins/pausemusic/CMakeLists.txt index d46ea4983..d57829fda 100644 --- a/plugins/pausemusic/CMakeLists.txt +++ b/plugins/pausemusic/CMakeLists.txt @@ -15,7 +15,7 @@ target_link_libraries(kdeconnect_pausemusic if (WIN32) target_link_libraries(kdeconnect_pausemusic windowsapp) else() - target_link_libraries(kdeconnect_pausemusic KF${QT_MAJOR_VERSION}::PulseAudioQt) + target_link_libraries(kdeconnect_pausemusic KF6::PulseAudioQt) endif() ####################################### @@ -27,6 +27,6 @@ ki18n_wrap_ui(kdeconnect_pausemusic_config pausemusic_config.ui) target_link_libraries(kdeconnect_pausemusic_config kdeconnectcore kdeconnectpluginkcm - KF${QT_MAJOR_VERSION}::I18n - KF${QT_MAJOR_VERSION}::KCMUtils + KF6::I18n + KF6::KCMUtils ) diff --git a/plugins/ping/CMakeLists.txt b/plugins/ping/CMakeLists.txt index 57c89f063..7c38b4311 100644 --- a/plugins/ping/CMakeLists.txt +++ b/plugins/ping/CMakeLists.txt @@ -2,5 +2,5 @@ kdeconnect_add_plugin(kdeconnect_ping SOURCES pingplugin.cpp) target_link_libraries(kdeconnect_ping kdeconnectcore Qt::DBus - KF${QT_MAJOR_VERSION}::I18n + KF6::I18n ) diff --git a/plugins/presenter/CMakeLists.txt b/plugins/presenter/CMakeLists.txt index f22dce173..c26e318d8 100644 --- a/plugins/presenter/CMakeLists.txt +++ b/plugins/presenter/CMakeLists.txt @@ -6,5 +6,5 @@ target_link_libraries(kdeconnect_presenter kdeconnectcore Qt::DBus Qt::Quick - KF${QT_MAJOR_VERSION}::I18n + KF6::I18n ) diff --git a/plugins/remotecontrol/CMakeLists.txt b/plugins/remotecontrol/CMakeLists.txt index 22f1166f0..3579a451b 100644 --- a/plugins/remotecontrol/CMakeLists.txt +++ b/plugins/remotecontrol/CMakeLists.txt @@ -2,5 +2,5 @@ kdeconnect_add_plugin(kdeconnect_remotecontrol SOURCES remotecontrolplugin.cpp) target_link_libraries(kdeconnect_remotecontrol kdeconnectcore Qt::DBus - KF${QT_MAJOR_VERSION}::I18n + KF6::I18n ) diff --git a/plugins/remotesystemvolume/CMakeLists.txt b/plugins/remotesystemvolume/CMakeLists.txt index dd7535da8..d8affbc8c 100644 --- a/plugins/remotesystemvolume/CMakeLists.txt +++ b/plugins/remotesystemvolume/CMakeLists.txt @@ -2,5 +2,5 @@ kdeconnect_add_plugin(kdeconnect_remotesystemvolume SOURCES remotesystemvolumepl target_link_libraries(kdeconnect_remotesystemvolume kdeconnectcore Qt::DBus - KF${QT_MAJOR_VERSION}::I18n + KF6::I18n ) diff --git a/plugins/runcommand/CMakeLists.txt b/plugins/runcommand/CMakeLists.txt index 6adfe53eb..ae4c90460 100644 --- a/plugins/runcommand/CMakeLists.txt +++ b/plugins/runcommand/CMakeLists.txt @@ -2,15 +2,15 @@ kdeconnect_add_plugin(kdeconnect_runcommand SOURCES runcommandplugin.cpp) target_link_libraries(kdeconnect_runcommand kdeconnectcore Qt::DBus - KF${QT_MAJOR_VERSION}::KCMUtils - KF${QT_MAJOR_VERSION}::I18n) + KF6::KCMUtils + KF6::I18n) #---------------------- kdeconnect_add_kcm(kdeconnect_runcommand_config SOURCES runcommand_config.cpp) target_link_libraries(kdeconnect_runcommand_config kdeconnectcore kdeconnectpluginkcm - KF${QT_MAJOR_VERSION}::I18n - KF${QT_MAJOR_VERSION}::CoreAddons - KF${QT_MAJOR_VERSION}::ConfigWidgets + KF6::I18n + KF6::CoreAddons + KF6::ConfigWidgets ) diff --git a/plugins/screensaver-inhibit/CMakeLists.txt b/plugins/screensaver-inhibit/CMakeLists.txt index c165f96c5..f4216ca15 100644 --- a/plugins/screensaver-inhibit/CMakeLists.txt +++ b/plugins/screensaver-inhibit/CMakeLists.txt @@ -18,7 +18,7 @@ target_link_libraries(kdeconnect_screensaver_inhibit kdeconnectcore kdeconnectin if(NOT APPLE AND NOT WIN32) target_link_libraries(kdeconnect_screensaver_inhibit Qt::DBus - KF${QT_MAJOR_VERSION}::I18n + KF6::I18n ) endif() diff --git a/plugins/sendnotifications/CMakeLists.txt b/plugins/sendnotifications/CMakeLists.txt index dfc648a55..373579aa3 100644 --- a/plugins/sendnotifications/CMakeLists.txt +++ b/plugins/sendnotifications/CMakeLists.txt @@ -8,10 +8,10 @@ target_sources(kdeconnect_sendnotifications PRIVATE target_link_libraries(kdeconnect_sendnotifications kdeconnectcore - KF${QT_MAJOR_VERSION}::I18n + KF6::I18n Qt::Gui - KF${QT_MAJOR_VERSION}::IconThemes - KF${QT_MAJOR_VERSION}::ConfigCore + KF6::IconThemes + KF6::ConfigCore ) @@ -39,6 +39,6 @@ target_sources(kdeconnect_sendnotifications_config PRIVATE target_link_libraries(kdeconnect_sendnotifications_config kdeconnectcore kdeconnectpluginkcm - KF${QT_MAJOR_VERSION}::I18n - KF${QT_MAJOR_VERSION}::KCMUtils + KF6::I18n + KF6::KCMUtils ) diff --git a/plugins/sftp/CMakeLists.txt b/plugins/sftp/CMakeLists.txt index c947a6404..d7f413741 100644 --- a/plugins/sftp/CMakeLists.txt +++ b/plugins/sftp/CMakeLists.txt @@ -18,8 +18,8 @@ kdeconnect_add_plugin(kdeconnect_sftp SOURCES ${kdeconnect_sftp_SRCS}) target_link_libraries(kdeconnect_sftp kdeconnectcore Qt::DBus - KF${QT_MAJOR_VERSION}::I18n - KF${QT_MAJOR_VERSION}::KIOFileWidgets - KF${QT_MAJOR_VERSION}::KIOWidgets - KF${QT_MAJOR_VERSION}::Notifications + KF6::I18n + KF6::KIOFileWidgets + KF6::KIOWidgets + KF6::Notifications ) diff --git a/plugins/share/CMakeLists.txt b/plugins/share/CMakeLists.txt index 2a73555f2..622b50197 100644 --- a/plugins/share/CMakeLists.txt +++ b/plugins/share/CMakeLists.txt @@ -2,20 +2,20 @@ kdeconnect_add_plugin(kdeconnect_share SOURCES shareplugin.cpp) target_link_libraries(kdeconnect_share kdeconnectcore Qt::DBus - KF${QT_MAJOR_VERSION}::Notifications - KF${QT_MAJOR_VERSION}::I18n - KF${QT_MAJOR_VERSION}::GuiAddons - KF${QT_MAJOR_VERSION}::KIOWidgets - KF${QT_MAJOR_VERSION}::Service + KF6::Notifications + KF6::I18n + KF6::GuiAddons + KF6::KIOWidgets + KF6::Service ) kdeconnect_add_kcm(kdeconnect_share_config SOURCES share_config.cpp) ki18n_wrap_ui(kdeconnect_share_config share_config.ui) target_link_libraries(kdeconnect_share_config kdeconnectpluginkcm - KF${QT_MAJOR_VERSION}::I18n - KF${QT_MAJOR_VERSION}::CoreAddons - KF${QT_MAJOR_VERSION}::ConfigWidgets - KF${QT_MAJOR_VERSION}::KIOWidgets - KF${QT_MAJOR_VERSION}::Notifications + KF6::I18n + KF6::CoreAddons + KF6::ConfigWidgets + KF6::KIOWidgets + KF6::Notifications ) diff --git a/plugins/sms/CMakeLists.txt b/plugins/sms/CMakeLists.txt index 691809bcf..2cf7ec0df 100644 --- a/plugins/sms/CMakeLists.txt +++ b/plugins/sms/CMakeLists.txt @@ -11,16 +11,14 @@ ecm_qt_declare_logging_category(kdeconnect_sms DEFAULT_SEVERITY Warning EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (conversations)") +find_package(Qt6 REQUIRED COMPONENTS Core5Compat) + target_link_libraries(kdeconnect_sms kdeconnectcore kdeconnectinterfaces Qt::DBus - KF${QT_MAJOR_VERSION}::I18n - KF${QT_MAJOR_VERSION}::Notifications + KF6::I18n + KF6::Notifications Qt::Widgets + Qt::Core5Compat # for QTextCodec ) - -if (QT_MAJOR_VERSION STREQUAL "6") - find_package(Qt6 REQUIRED COMPONENTS Core5Compat) - target_link_libraries(kdeconnect_sms Qt::Core5Compat) # for QTextCodec -endif() diff --git a/plugins/systemvolume/CMakeLists.txt b/plugins/systemvolume/CMakeLists.txt index fc3b72e8d..b8d88e664 100644 --- a/plugins/systemvolume/CMakeLists.txt +++ b/plugins/systemvolume/CMakeLists.txt @@ -31,6 +31,6 @@ else() target_link_libraries(kdeconnect_systemvolume kdeconnectcore Qt::Core - KF${QT_MAJOR_VERSION}::PulseAudioQt + KF6::PulseAudioQt ) endif() diff --git a/plugins/telephony/CMakeLists.txt b/plugins/telephony/CMakeLists.txt index a9ae57916..ab50c2ea1 100644 --- a/plugins/telephony/CMakeLists.txt +++ b/plugins/telephony/CMakeLists.txt @@ -1,7 +1,7 @@ kdeconnect_add_plugin(kdeconnect_telephony SOURCES telephonyplugin.cpp) target_link_libraries(kdeconnect_telephony kdeconnectcore - KF${QT_MAJOR_VERSION}::I18n - KF${QT_MAJOR_VERSION}::Notifications + KF6::I18n + KF6::Notifications Qt::DBus ) diff --git a/settings/CMakeLists.txt b/settings/CMakeLists.txt index 97ccf34d7..0d326f024 100644 --- a/settings/CMakeLists.txt +++ b/settings/CMakeLists.txt @@ -7,7 +7,7 @@ add_executable(kdeconnect-settings ${kdeconnect_custom_icons_SRCS} ) -target_link_libraries(kdeconnect-settings kdeconnectversion KF${QT_MAJOR_VERSION}::I18n KF${QT_MAJOR_VERSION}::KCMUtils KF${QT_MAJOR_VERSION}::DBusAddons KF${QT_MAJOR_VERSION}::WindowSystem) +target_link_libraries(kdeconnect-settings kdeconnectversion KF6::I18n KF6::KCMUtils KF6::DBusAddons KF6::WindowSystem) install(TARGETS kdeconnect-settings ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) install(FILES org.kde.kdeconnect-settings.desktop DESTINATION ${KDE_INSTALL_APPDIR}) diff --git a/smsapp/CMakeLists.txt b/smsapp/CMakeLists.txt index 97bb550dd..1484f7c9f 100644 --- a/smsapp/CMakeLists.txt +++ b/smsapp/CMakeLists.txt @@ -26,7 +26,7 @@ target_link_libraries(kdeconnectsmshelper PUBLIC Qt::Core Qt::DBus - KF${QT_MAJOR_VERSION}::People + KF6::People Qt::Qml kdeconnectinterfaces ) @@ -62,11 +62,11 @@ target_link_libraries(kdeconnect-sms PRIVATE Qt::Quick Qt::QuickControls2 Qt::Widgets - KF${QT_MAJOR_VERSION}::CoreAddons - KF${QT_MAJOR_VERSION}::DBusAddons - KF${QT_MAJOR_VERSION}::I18n - KF${QT_MAJOR_VERSION}::People - KF${QT_MAJOR_VERSION}::KCMUtils + KF6::CoreAddons + KF6::DBusAddons + KF6::I18n + KF6::People + KF6::KCMUtils ) install(TARGETS kdeconnect-sms ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 096df93a2..69e195538 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,15 +1,15 @@ -find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED COMPONENTS Test) +find_package(Qt6 ${QT_MIN_VERSION} REQUIRED COMPONENTS Test) set(kdeconnect_libraries kdeconnectcore kdeconnectinterfaces kdeconnectsmshelper kdeconnectversion - KF${QT_MAJOR_VERSION}::I18n - KF${QT_MAJOR_VERSION}::KIOWidgets + KF6::I18n + KF6::KIOWidgets Qt::DBus Qt::Network - KF${QT_MAJOR_VERSION}::People + KF6::People Qt::Qml Qt::Test ) diff --git a/urlhandler/CMakeLists.txt b/urlhandler/CMakeLists.txt index c3bb33434..8ccc42d8c 100644 --- a/urlhandler/CMakeLists.txt +++ b/urlhandler/CMakeLists.txt @@ -12,11 +12,11 @@ target_link_libraries(kdeconnect-handler kdeconnectcore kdeconnectversion Qt::Widgets - KF${QT_MAJOR_VERSION}::CoreAddons - KF${QT_MAJOR_VERSION}::ConfigWidgets - KF${QT_MAJOR_VERSION}::DBusAddons - KF${QT_MAJOR_VERSION}::I18n - KF${QT_MAJOR_VERSION}::KIOCore KF${QT_MAJOR_VERSION}::KIOFileWidgets KF${QT_MAJOR_VERSION}::KIOWidgets + KF6::CoreAddons + KF6::ConfigWidgets + KF6::DBusAddons + KF6::I18n + KF6::KIOCore KF6::KIOFileWidgets KF6::KIOWidgets ) install(TARGETS kdeconnect-handler ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})