diff --git a/CMakeLists.txt b/CMakeLists.txt index 6b506ce64..dc777c2a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,8 +62,8 @@ if (SAILFISHOS) add_definitions(-DSAILFISHOS) else() - find_package(Qca-qt5 ${QCA_MIN_VERSION} REQUIRED) - set(Qca_LIBRARY qca-qt5) + find_package(Qca-qt${QT_MAJOR_VERSION} ${QCA_MIN_VERSION} REQUIRED) + set(Qca_LIBRARY qca-qt${QT_MAJOR_VERSION}) set(KF5_REQUIRED_COMPONENTS I18n ConfigWidgets DBusAddons IconThemes Notifications KIO KCMUtils Service Solid Kirigami2 People WindowSystem GuiAddons) set(KF5_OPTIONAL_COMPONENTS DocTools Wayland) @@ -78,9 +78,11 @@ else() if(UNIX AND NOT APPLE) find_package(KF5Package REQUIRED) find_package(KF5PulseAudioQt) - find_package(QtWaylandScanner REQUIRED) + if (QT_MAJOR_VERSION EQUAL "5") + find_package(QtWaylandScanner REQUIRED) + endif() find_package(Wayland 1.9 REQUIRED Client) - find_package(Qt5 REQUIRED COMPONENTS WaylandClient) + find_package(Qt${QT_MAJOR_VERSION} REQUIRED COMPONENTS WaylandClient) find_package(PlasmaWaylandProtocols REQUIRED) endif() @@ -100,8 +102,8 @@ endif() add_definitions(-DQT_NO_URL_CAST_FROM_STRING -DQT_NO_KEYWORDS -DQT_NO_CAST_FROM_ASCII) -find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS DBus Quick QuickControls2 Network Multimedia) -if (UNIX AND NOT APPLE) +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(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS ${KF5_REQUIRED_COMPONENTS}) diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 414f8bdea..eee6d3784 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -22,7 +22,7 @@ add_executable(kdeconnect-app ${kdeconnect_SRCS} ${kdeconnect_custom_icons_SRCS} ) -target_link_libraries(kdeconnect-app Qt5::Quick Qt5::QuickControls2 Qt5::Widgets KF5::CoreAddons KF5::I18n KF5::KCMUtils) +target_link_libraries(kdeconnect-app Qt::Quick Qt::QuickControls2 Qt::Widgets KF5::CoreAddons KF5::I18n KF5::KCMUtils) install(TARGETS kdeconnect-app ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) install(PROGRAMS org.kde.kdeconnect.app.desktop DESTINATION ${KDE_INSTALL_APPDIR}) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 42b486d92..623b4ebf3 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -57,11 +57,11 @@ target_include_directories(kdeconnectcore PUBLIC ${PROJECT_SOURCE_DIR}) target_link_libraries(kdeconnectcore PUBLIC - Qt5::Network + Qt${QT_MAJOR_VERSION}::Network KF5::CoreAddons ${Qca_LIBRARY} PRIVATE - Qt5::DBus + Qt${QT_MAJOR_VERSION}::DBus KF5::I18n KF5::ConfigCore ) diff --git a/daemon/CMakeLists.txt b/daemon/CMakeLists.txt index 844f1c1a6..1652238b7 100644 --- a/daemon/CMakeLists.txt +++ b/daemon/CMakeLists.txt @@ -17,7 +17,7 @@ target_link_libraries(kdeconnectd KF5::Notifications KF5::I18n KF5::WindowSystem - Qt5::Widgets) + Qt::Widgets) ecm_mark_nongui_executable(kdeconnectd) diff --git a/indicator/CMakeLists.txt b/indicator/CMakeLists.txt index da5622ace..29565e9d0 100644 --- a/indicator/CMakeLists.txt +++ b/indicator/CMakeLists.txt @@ -43,7 +43,7 @@ add_executable(kdeconnect-indicator ${indicator_SRCS} ${debug_file_SRCS}) target_include_directories(kdeconnect-indicator PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/systray_actions) -target_link_libraries(kdeconnect-indicator Qt5::Widgets KF5::CoreAddons KF5::I18n KF5::Notifications KF5::DBusAddons KF5::KCMUtils kdeconnectinterfaces kdeconnectcore kdeconnectversion) +target_link_libraries(kdeconnect-indicator Qt::Widgets KF5::CoreAddons KF5::I18n KF5::Notifications KF5::DBusAddons KF5::KCMUtils kdeconnectinterfaces kdeconnectcore kdeconnectversion) if (WIN32) add_compile_definitions(QSYSTRAY) diff --git a/interfaces/CMakeLists.txt b/interfaces/CMakeLists.txt index c415acc70..311256dce 100644 --- a/interfaces/CMakeLists.txt +++ b/interfaces/CMakeLists.txt @@ -2,11 +2,11 @@ add_definitions(-DTRANSLATION_DOMAIN=\"kdeconnect-interfaces\") function(geninterface source_h output_h) set(xml_file ${CMAKE_CURRENT_BINARY_DIR}/${output_h}.xml) - qt5_generate_dbus_interface( ${source_h} ${xml_file}) + qt_generate_dbus_interface( ${source_h} ${xml_file}) set_source_files_properties(${xml_file} PROPERTIES NO_NAMESPACE true) - qt5_add_dbus_interface(libkdeconnect_SRC ${xml_file} ${output_h}) + qt_add_dbus_interface(libkdeconnect_SRC ${xml_file} ${output_h}) set(libkdeconnect_SRC ${libkdeconnect_SRC} PARENT_SCOPE) endfunction() @@ -69,8 +69,8 @@ generate_export_header(kdeconnectinterfaces EXPORT_FILE_NAME ${CMAKE_CURRENT_BIN target_link_libraries(kdeconnectinterfaces LINK_PUBLIC - Qt5::Gui - Qt5::DBus + Qt${QT_MAJOR_VERSION}::Gui + Qt${QT_MAJOR_VERSION}::DBus KF5::ConfigCore LINK_PRIVATE kdeconnectcore diff --git a/kcm/CMakeLists.txt b/kcm/CMakeLists.txt index ac74a33df..09b5c4726 100644 --- a/kcm/CMakeLists.txt +++ b/kcm/CMakeLists.txt @@ -7,8 +7,8 @@ ki18n_wrap_ui(kcm_kdeconnect kcm.ui) kcoreaddons_desktop_to_json(kcm_kdeconnect "kcm_kdeconnect.desktop") target_link_libraries(kcm_kdeconnect - Qt5::Core - Qt5::Gui + Qt::Core + Qt::Gui KF5::I18n KF5::KCMUtils kdeconnectinterfaces @@ -16,4 +16,4 @@ target_link_libraries(kcm_kdeconnect ) install(TARGETS kcm_kdeconnect DESTINATION ${KDE_INSTALL_PLUGINDIR}) -install(FILES kcm_kdeconnect.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR}) +install(FILES kcm_kdeconnect.desktop DESTINATION ${KDE_INSTALL_KSERVICESDIR}) diff --git a/kcmplugin/CMakeLists.txt b/kcmplugin/CMakeLists.txt index 8a3f735a1..a18529f80 100644 --- a/kcmplugin/CMakeLists.txt +++ b/kcmplugin/CMakeLists.txt @@ -5,8 +5,8 @@ target_link_libraries(kdeconnectpluginkcm PUBLIC kdeconnectcore PRIVATE - Qt5::DBus - Qt5::Gui + Qt::DBus + Qt::Gui KF5::I18n KF5::ConfigCore KF5::KCMUtils diff --git a/kio/CMakeLists.txt b/kio/CMakeLists.txt index 4f6bb1e9e..bb8987d1a 100644 --- a/kio/CMakeLists.txt +++ b/kio/CMakeLists.txt @@ -16,8 +16,8 @@ add_library(kio_kdeconnect MODULE ${kio_kdeconnect_PART_SRCS}) target_link_libraries(kio_kdeconnect kdeconnectinterfaces - Qt5::Core - Qt5::Network + Qt::Core + Qt::Network KF5::KIOCore KF5::I18n ) diff --git a/plasmoid/CMakeLists.txt b/plasmoid/CMakeLists.txt index c798acd5d..0afd2b39c 100644 --- a/plasmoid/CMakeLists.txt +++ b/plasmoid/CMakeLists.txt @@ -1,5 +1,5 @@ kpackage_install_package(package org.kde.kdeconnect plasmoids plasma NO_DEPRECATED_WARNING) install(FILES package/metadata.desktop - DESTINATION ${KDE_INSTALL_KSERVICES5DIR} + DESTINATION ${KDE_INSTALL_KSERVICESDIR} RENAME plasma-kdeconnect.desktop) diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 86cc19155..01abe99dd 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -62,4 +62,4 @@ endif() # If we split notifications per plugin, in several notifyrc files, they won't # appear in the same group in the Notifications KCM -install(FILES kdeconnect.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFY5RCDIR}) +install(FILES kdeconnect.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFYRCDIR}) diff --git a/plugins/battery/CMakeLists.txt b/plugins/battery/CMakeLists.txt index 82275c13e..4e26245eb 100644 --- a/plugins/battery/CMakeLists.txt +++ b/plugins/battery/CMakeLists.txt @@ -14,7 +14,7 @@ kdeconnect_add_plugin(kdeconnect_battery SOURCES ${kdeconnect_battery_SRCS}) target_link_libraries(kdeconnect_battery kdeconnectcore - Qt5::DBus + Qt${QT_MAJOR_VERSION}::DBus KF5::Solid KF5::I18n ) diff --git a/plugins/bigscreen/CMakeLists.txt b/plugins/bigscreen/CMakeLists.txt index bb2c271f4..4a31db458 100644 --- a/plugins/bigscreen/CMakeLists.txt +++ b/plugins/bigscreen/CMakeLists.txt @@ -4,4 +4,4 @@ set(kdeconnect_bigscreen_SRCS kdeconnect_add_plugin(kdeconnect_bigscreen SOURCES ${kdeconnect_bigscreen_SRCS}) -target_link_libraries(kdeconnect_bigscreen kdeconnectcore Qt5::DBus KF5::I18n) +target_link_libraries(kdeconnect_bigscreen kdeconnectcore Qt${QT_MAJOR_VERSION}::DBus KF5::I18n) diff --git a/plugins/connectivity-report/CMakeLists.txt b/plugins/connectivity-report/CMakeLists.txt index 5f7742a1d..5d637f1ab 100644 --- a/plugins/connectivity-report/CMakeLists.txt +++ b/plugins/connectivity-report/CMakeLists.txt @@ -14,7 +14,7 @@ kdeconnect_add_plugin(kdeconnect_connectivity_report SOURCES ${kdeconnect_connec target_link_libraries(kdeconnect_connectivity_report kdeconnectcore - Qt5::DBus + Qt${QT_MAJOR_VERSION}::DBus KF5::Solid KF5::I18n ) diff --git a/plugins/contacts/CMakeLists.txt b/plugins/contacts/CMakeLists.txt index 8dc7bc2af..eedcadd3a 100644 --- a/plugins/contacts/CMakeLists.txt +++ b/plugins/contacts/CMakeLists.txt @@ -14,5 +14,5 @@ kdeconnect_add_plugin(kdeconnect_contacts SOURCES ${kdeconnect_contacts_SRCS}) target_link_libraries(kdeconnect_contacts kdeconnectcore - Qt5::DBus + Qt::DBus ) diff --git a/plugins/findmyphone/CMakeLists.txt b/plugins/findmyphone/CMakeLists.txt index 43903fa93..4eb667a82 100644 --- a/plugins/findmyphone/CMakeLists.txt +++ b/plugins/findmyphone/CMakeLists.txt @@ -4,6 +4,6 @@ set(kdeconnect_findmyphone_SRCS kdeconnect_add_plugin(kdeconnect_findmyphone SOURCES ${kdeconnect_findmyphone_SRCS}) -target_link_libraries(kdeconnect_findmyphone kdeconnectcore Qt5::Core Qt5::DBus) +target_link_libraries(kdeconnect_findmyphone kdeconnectcore Qt::Core Qt::DBus) diff --git a/plugins/findthisdevice/CMakeLists.txt b/plugins/findthisdevice/CMakeLists.txt index 55deb027e..075c1d75f 100644 --- a/plugins/findthisdevice/CMakeLists.txt +++ b/plugins/findthisdevice/CMakeLists.txt @@ -15,9 +15,9 @@ kdeconnect_add_plugin(kdeconnect_findthisdevice target_link_libraries(kdeconnect_findthisdevice kdeconnectcore - Qt5::Core - Qt5::Multimedia - Qt5::DBus + Qt::Core + Qt::Multimedia + Qt::DBus ) if (NOT WIN32) @@ -32,7 +32,7 @@ ki18n_wrap_ui(kdeconnect_findthisdevice_config findthisdevice_config.ui) target_sources(kdeconnect_findthisdevice_config PRIVATE findthisdevice_config.cpp ${debug_file_SRCS}) target_link_libraries(kdeconnect_findthisdevice_config kdeconnectpluginkcm - Qt5::Multimedia + Qt::Multimedia KF5::I18n KF5::CoreAddons KF5::ConfigWidgets diff --git a/plugins/lockdevice/CMakeLists.txt b/plugins/lockdevice/CMakeLists.txt index 6a99f1d7b..132f6ebac 100644 --- a/plugins/lockdevice/CMakeLists.txt +++ b/plugins/lockdevice/CMakeLists.txt @@ -1,5 +1,5 @@ -qt5_add_dbus_interface(lockdevice_SRCS org.freedesktop.login1.xml login1dbusinterface) -qt5_add_dbus_interface(lockdevice_SRCS org.freedesktop.DBus.Properties.xml propertiesdbusinterface) +qt_add_dbus_interface(lockdevice_SRCS org.freedesktop.login1.xml login1dbusinterface) +qt_add_dbus_interface(lockdevice_SRCS org.freedesktop.DBus.Properties.xml propertiesdbusinterface) set(debug_file_SRCS) ecm_qt_declare_logging_category( @@ -18,6 +18,6 @@ kdeconnect_add_plugin(kdeconnect_lockdevice SOURCES ${lockdevice_SRCS} ${debug_f target_link_libraries(kdeconnect_lockdevice kdeconnectcore - Qt5::DBus + Qt::DBus KF5::I18n ) diff --git a/plugins/mousepad/CMakeLists.txt b/plugins/mousepad/CMakeLists.txt index 39a9e70df..edf8c155a 100644 --- a/plugins/mousepad/CMakeLists.txt +++ b/plugins/mousepad/CMakeLists.txt @@ -9,18 +9,25 @@ if(UNIX AND NOT APPLE) PURPOSE "Needed for the remote mousepad plugin" ) - ecm_add_qtwayland_client_protocol(wayland_SRCS - PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/fake-input.xml - BASENAME fake-input - ) + if (QT_MAJOR_VERSION EQUAL "5") + ecm_add_qtwayland_client_protocol(wayland_SRCS + PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/fake-input.xml + BASENAME fake-input + ) + else() + qt6_generate_wayland_protocol_client_sources(kdeconnect_mousepad FILES + ${PLASMA_WAYLAND_PROTOCOLS_DIR}/fake-input.xml) + endif() target_sources(kdeconnect_mousepad PRIVATE ${wayland_SRCS}) - target_link_libraries(kdeconnect_mousepad Wayland::Client Qt5::WaylandClient) + target_link_libraries(kdeconnect_mousepad Wayland::Client Qt::WaylandClient) target_sources(kdeconnect_mousepad PUBLIC waylandremoteinput.cpp) set(HAVE_WAYLAND TRUE) if (LibFakeKey_FOUND) - find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS X11Extras) + 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}) @@ -32,7 +39,7 @@ set(HAVE_X11 ${LibFakeKey_FOUND}) set(HAVE_MACOS ${APPLE}) configure_file(config-mousepad.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-mousepad.h ) -target_link_libraries(kdeconnect_mousepad kdeconnectcore Qt5::Gui KF5::I18n) +target_link_libraries(kdeconnect_mousepad kdeconnectcore Qt::Gui KF5::I18n) if (HAVE_WINDOWS) target_sources(kdeconnect_mousepad PUBLIC windowsremoteinput.cpp) @@ -40,7 +47,10 @@ endif() if(HAVE_X11) target_sources(kdeconnect_mousepad PUBLIC x11remoteinput.cpp) - target_link_libraries(kdeconnect_mousepad Qt5::X11Extras ${X11_LIBRARIES} ${XTEST_LIBRARIES} ${LibFakeKey_LIBRARIES}) + if (QT_MAJOR_VERSION EQUAL "5") + target_link_libraries(kdeconnect_mousepad Qt5::X11Extras) + endif() + target_link_libraries(kdeconnect_mousepad ${X11_LIBRARIES} ${XTEST_LIBRARIES} ${LibFakeKey_LIBRARIES}) endif() if (HAVE_MACOS) diff --git a/plugins/mpriscontrol/CMakeLists.txt b/plugins/mpriscontrol/CMakeLists.txt index f5ac0e44a..7fb7e2f64 100644 --- a/plugins/mpriscontrol/CMakeLists.txt +++ b/plugins/mpriscontrol/CMakeLists.txt @@ -14,9 +14,9 @@ set_source_files_properties( PROPERTIES NO_NAMESPACE ON) -qt5_add_dbus_interface(kdeconnect_mpriscontrol_SRCS org.freedesktop.DBus.Properties.xml dbusproperties) -qt5_add_dbus_interface(kdeconnect_mpriscontrol_SRCS org.mpris.MediaPlayer2.Player.xml mprisplayer) -qt5_add_dbus_interface(kdeconnect_mpriscontrol_SRCS org.mpris.MediaPlayer2.xml mprisroot) +qt_add_dbus_interface(kdeconnect_mpriscontrol_SRCS org.freedesktop.DBus.Properties.xml dbusproperties) +qt_add_dbus_interface(kdeconnect_mpriscontrol_SRCS org.mpris.MediaPlayer2.Player.xml mprisplayer) +qt_add_dbus_interface(kdeconnect_mpriscontrol_SRCS org.mpris.MediaPlayer2.xml mprisroot) endif() @@ -33,5 +33,5 @@ if(WIN32) target_link_libraries(kdeconnect_mpriscontrol kdeconnectcore windowsapp) target_compile_features(kdeconnect_mpriscontrol PUBLIC cxx_std_17) else() - target_link_libraries(kdeconnect_mpriscontrol Qt5::DBus kdeconnectcore) + target_link_libraries(kdeconnect_mpriscontrol Qt::DBus kdeconnectcore) endif() diff --git a/plugins/mprisremote/CMakeLists.txt b/plugins/mprisremote/CMakeLists.txt index 8d1e1a37f..a1ea1be33 100644 --- a/plugins/mprisremote/CMakeLists.txt +++ b/plugins/mprisremote/CMakeLists.txt @@ -9,5 +9,5 @@ kdeconnect_add_plugin(kdeconnect_mprisremote SOURCES mprisremoteplugin.cpp mpris target_link_libraries(kdeconnect_mprisremote kdeconnectcore - Qt5::DBus + Qt::DBus ) diff --git a/plugins/notifications/CMakeLists.txt b/plugins/notifications/CMakeLists.txt index 445bb55a5..b6ebb5a8b 100644 --- a/plugins/notifications/CMakeLists.txt +++ b/plugins/notifications/CMakeLists.txt @@ -18,14 +18,14 @@ kdeconnect_add_plugin(kdeconnect_notifications SOURCES ${kdeconnect_notification target_link_libraries(kdeconnect_notifications kdeconnectcore - Qt5::DBus + Qt::DBus KF5::Notifications KF5::I18n KF5::WindowSystem ) -if (UNIX AND NOT APPLE) +if (UNIX AND NOT APPLE AND QT_MAJOR_VERSION EQUAL "5") target_link_libraries(kdeconnect_notifications - Qt::X11Extras + Qt5::X11Extras ) endif() diff --git a/plugins/pausemusic/CMakeLists.txt b/plugins/pausemusic/CMakeLists.txt index 0ced88178..b9d8620a5 100644 --- a/plugins/pausemusic/CMakeLists.txt +++ b/plugins/pausemusic/CMakeLists.txt @@ -15,14 +15,14 @@ ecm_qt_declare_logging_category( DEFAULT_SEVERITY Warning EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin pausemusic)") -qt5_add_dbus_interface(kdeconnect_pausemusic_SRCS org.mpris.MediaPlayer2.Player.xml mprisplayer) +qt_add_dbus_interface(kdeconnect_pausemusic_SRCS org.mpris.MediaPlayer2.Player.xml mprisplayer) kdeconnect_add_plugin(kdeconnect_pausemusic SOURCES ${kdeconnect_pausemusic_SRCS} ${debug_file_SRCS}) target_link_libraries(kdeconnect_pausemusic kdeconnectcore - Qt5::Core - Qt5::DBus + Qt::Core + Qt::DBus ) if (NOT WIN32) target_link_libraries(kdeconnect_pausemusic diff --git a/plugins/photo/CMakeLists.txt b/plugins/photo/CMakeLists.txt index bc761b6d6..a1470bb80 100644 --- a/plugins/photo/CMakeLists.txt +++ b/plugins/photo/CMakeLists.txt @@ -14,5 +14,5 @@ kdeconnect_add_plugin(kdeconnect_photo SOURCES ${kdeconnect_photo_SRCS}) target_link_libraries(kdeconnect_photo kdeconnectcore - Qt5::DBus + Qt::DBus ) diff --git a/plugins/ping/CMakeLists.txt b/plugins/ping/CMakeLists.txt index 726e802e1..3b9cce3bd 100644 --- a/plugins/ping/CMakeLists.txt +++ b/plugins/ping/CMakeLists.txt @@ -14,6 +14,6 @@ kdeconnect_add_plugin(kdeconnect_ping SOURCES ${kdeconnect_ping_SRCS}) target_link_libraries(kdeconnect_ping kdeconnectcore - Qt5::DBus + Qt${QT_MAJOR_VERSION}::DBus KF5::I18n ) diff --git a/plugins/presenter/CMakeLists.txt b/plugins/presenter/CMakeLists.txt index 9ddc9e50a..f347ae2fb 100644 --- a/plugins/presenter/CMakeLists.txt +++ b/plugins/presenter/CMakeLists.txt @@ -10,7 +10,7 @@ ecm_qt_declare_logging_category( kdeconnect_add_plugin(kdeconnect_presenter SOURCES presenterplugin.cpp ${presenter_SRCS} ${debug_file_SRCS}) target_link_libraries(kdeconnect_presenter kdeconnectcore - Qt5::DBus - Qt5::Quick + Qt${QT_MAJOR_VERSION}::DBus + Qt${QT_MAJOR_VERSION}::Quick KF5::I18n ) diff --git a/plugins/remotecommands/CMakeLists.txt b/plugins/remotecommands/CMakeLists.txt index dd8450cef..828bd8838 100644 --- a/plugins/remotecommands/CMakeLists.txt +++ b/plugins/remotecommands/CMakeLists.txt @@ -12,5 +12,5 @@ kdeconnect_add_plugin(kdeconnect_remotecommands target_link_libraries(kdeconnect_remotecommands kdeconnectcore - Qt5::DBus + Qt${QT_MAJOR_VERSION}::DBus ) diff --git a/plugins/remotecontrol/CMakeLists.txt b/plugins/remotecontrol/CMakeLists.txt index 33179e69a..e1a5df64f 100644 --- a/plugins/remotecontrol/CMakeLists.txt +++ b/plugins/remotecontrol/CMakeLists.txt @@ -9,6 +9,6 @@ kdeconnect_add_plugin(kdeconnect_remotecontrol SOURCES remotecontrolplugin.cpp $ target_link_libraries(kdeconnect_remotecontrol kdeconnectcore - Qt5::DBus + Qt${QT_MAJOR_VERSION}::DBus KF5::I18n ) diff --git a/plugins/remotekeyboard/CMakeLists.txt b/plugins/remotekeyboard/CMakeLists.txt index 8c023565f..7d6465bdf 100644 --- a/plugins/remotekeyboard/CMakeLists.txt +++ b/plugins/remotekeyboard/CMakeLists.txt @@ -10,5 +10,5 @@ kdeconnect_add_plugin(kdeconnect_remotekeyboard target_link_libraries(kdeconnect_remotekeyboard kdeconnectcore - Qt5::DBus + Qt::DBus ) diff --git a/plugins/remotesystemvolume/CMakeLists.txt b/plugins/remotesystemvolume/CMakeLists.txt index c83ac3fed..63a342b32 100644 --- a/plugins/remotesystemvolume/CMakeLists.txt +++ b/plugins/remotesystemvolume/CMakeLists.txt @@ -14,6 +14,6 @@ kdeconnect_add_plugin(kdeconnect_remotesystemvolume SOURCES ${kdeconnect_remotes target_link_libraries(kdeconnect_remotesystemvolume kdeconnectcore - Qt5::DBus + Qt${QT_MAJOR_VERSION}::DBus KF5::I18n ) diff --git a/plugins/runcommand/CMakeLists.txt b/plugins/runcommand/CMakeLists.txt index 1f0e6a2ab..9a4a84662 100644 --- a/plugins/runcommand/CMakeLists.txt +++ b/plugins/runcommand/CMakeLists.txt @@ -14,7 +14,7 @@ kdeconnect_add_plugin(kdeconnect_runcommand SOURCES ${kdeconnect_runcommand_SRCS target_link_libraries(kdeconnect_runcommand kdeconnectcore - Qt5::DBus + Qt${QT_MAJOR_VERSION}::DBus KF5::KCMUtils KF5::I18n) diff --git a/plugins/screensaver-inhibit/CMakeLists.txt b/plugins/screensaver-inhibit/CMakeLists.txt index c19b5fc48..3fad929ee 100644 --- a/plugins/screensaver-inhibit/CMakeLists.txt +++ b/plugins/screensaver-inhibit/CMakeLists.txt @@ -10,7 +10,7 @@ else() set(kdeconnect_screensaver_inhibit_SRCS screensaverinhibitplugin.cpp ) - qt5_add_dbus_interface(kdeconnect_screensaver_inhibit_SRCS org.freedesktop.ScreenSaver.xml screensaverinterface) + qt_add_dbus_interface(kdeconnect_screensaver_inhibit_SRCS org.freedesktop.ScreenSaver.xml screensaverinterface) endif() set(debug_file_SRCS) @@ -25,7 +25,7 @@ kdeconnect_add_plugin(kdeconnect_screensaver_inhibit SOURCES ${kdeconnect_screen target_link_libraries(kdeconnect_screensaver_inhibit kdeconnectcore) if(NOT APPLE AND NOT WIN32) target_link_libraries(kdeconnect_screensaver_inhibit - Qt5::DBus + Qt::DBus KF5::I18n ) endif() diff --git a/plugins/sendnotifications/CMakeLists.txt b/plugins/sendnotifications/CMakeLists.txt index ac4da2d4c..90bcde7af 100644 --- a/plugins/sendnotifications/CMakeLists.txt +++ b/plugins/sendnotifications/CMakeLists.txt @@ -25,9 +25,9 @@ kdeconnect_add_plugin(kdeconnect_sendnotifications SOURCES ${kdeconnect_sendnoti target_link_libraries(kdeconnect_sendnotifications kdeconnectcore - Qt5::DBus + Qt::DBus KF5::I18n - Qt5::Gui + Qt::Gui KF5::IconThemes KF5::ConfigCore ) diff --git a/plugins/sftp/CMakeLists.txt b/plugins/sftp/CMakeLists.txt index 192385d21..7bade2fcf 100644 --- a/plugins/sftp/CMakeLists.txt +++ b/plugins/sftp/CMakeLists.txt @@ -25,7 +25,7 @@ kdeconnect_add_plugin(kdeconnect_sftp SOURCES ${kdeconnect_sftp_SRCS} ${debug_fi target_link_libraries(kdeconnect_sftp kdeconnectcore - Qt5::DBus + Qt::DBus KF5::I18n KF5::KIOFileWidgets KF5::KIOWidgets diff --git a/plugins/share/CMakeLists.txt b/plugins/share/CMakeLists.txt index b34dd1194..74a74d9f8 100644 --- a/plugins/share/CMakeLists.txt +++ b/plugins/share/CMakeLists.txt @@ -14,7 +14,7 @@ kdeconnect_add_plugin(kdeconnect_share SOURCES ${kdeconnect_share_SRCS}) target_link_libraries(kdeconnect_share kdeconnectcore - Qt5::DBus + Qt::DBus KF5::Notifications KF5::I18n KF5::KIOWidgets diff --git a/plugins/sms/CMakeLists.txt b/plugins/sms/CMakeLists.txt index dc57345a7..de6075bbe 100644 --- a/plugins/sms/CMakeLists.txt +++ b/plugins/sms/CMakeLists.txt @@ -23,8 +23,8 @@ kdeconnect_add_plugin(kdeconnect_sms SOURCES ${kdeconnect_sms_SRCS}) target_link_libraries(kdeconnect_sms kdeconnectcore kdeconnectinterfaces - Qt5::DBus + Qt::DBus KF5::I18n KF5::Notifications - Qt5::Widgets + Qt::Widgets ) diff --git a/plugins/systemvolume/CMakeLists.txt b/plugins/systemvolume/CMakeLists.txt index 2e9f3214b..164fe3bd5 100644 --- a/plugins/systemvolume/CMakeLists.txt +++ b/plugins/systemvolume/CMakeLists.txt @@ -23,7 +23,7 @@ kdeconnect_add_plugin(kdeconnect_systemvolume SOURCES ${kdeconnect_systemvolume_ if(WIN32) target_link_libraries(kdeconnect_systemvolume kdeconnectcore - Qt5::Core + Qt::Core ole32 ) target_sources(kdeconnect_systemvolume @@ -32,13 +32,13 @@ if(WIN32) elseif(APPLE) target_link_libraries(kdeconnect_systemvolume kdeconnectcore - Qt5::Core + Qt::Core "-framework CoreAudio" ) else() target_link_libraries(kdeconnect_systemvolume kdeconnectcore - Qt5::Core + Qt::Core KF5::PulseAudioQt ) endif() diff --git a/plugins/telephony/CMakeLists.txt b/plugins/telephony/CMakeLists.txt index 89adec362..c326212fc 100644 --- a/plugins/telephony/CMakeLists.txt +++ b/plugins/telephony/CMakeLists.txt @@ -16,5 +16,5 @@ target_link_libraries(kdeconnect_telephony kdeconnectcore KF5::I18n KF5::Notifications - Qt5::DBus + Qt::DBus ) diff --git a/plugins/virtualmonitor/CMakeLists.txt b/plugins/virtualmonitor/CMakeLists.txt index b12896f7c..f1d73a180 100644 --- a/plugins/virtualmonitor/CMakeLists.txt +++ b/plugins/virtualmonitor/CMakeLists.txt @@ -15,7 +15,7 @@ kdeconnect_add_plugin(kdeconnect_virtualmonitor target_link_libraries(kdeconnect_virtualmonitor kdeconnectcore - Qt5::Core - Qt5::Multimedia - Qt5::DBus + Qt::Core + Qt::Multimedia + Qt::DBus ) diff --git a/smsapp/CMakeLists.txt b/smsapp/CMakeLists.txt index 120ef4ac9..5470878a4 100644 --- a/smsapp/CMakeLists.txt +++ b/smsapp/CMakeLists.txt @@ -28,10 +28,10 @@ target_include_directories(kdeconnectsmshelper PUBLIC ${CMAKE_SOURCE_DIR}) target_link_libraries(kdeconnectsmshelper PUBLIC - Qt5::Core - Qt5::DBus + Qt::Core + Qt::DBus KF5::People - Qt5::Qml + Qt::Qml kdeconnectinterfaces ) @@ -52,9 +52,9 @@ target_link_libraries(kdeconnect-sms kdeconnectsmshelper kdeconnectinterfaces kdeconnectversion - Qt5::Quick - Qt5::QuickControls2 - Qt5::Widgets + Qt::Quick + Qt::QuickControls2 + Qt::Widgets KF5::CoreAddons KF5::DBusAddons KF5::I18n diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 2b6045e7c..5261e84e6 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,12 +1,12 @@ -find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS Test) +find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED COMPONENTS Test) set(kdeconnect_libraries kdeconnectcore kdeconnectversion KF5::I18n - Qt5::DBus - Qt5::Network - Qt5::Test + Qt::DBus + Qt::Network + Qt::Test ) if(${KF5KIO_FOUND}) diff --git a/urlhandler/CMakeLists.txt b/urlhandler/CMakeLists.txt index 8a9d81aad..8cfc7f14b 100644 --- a/urlhandler/CMakeLists.txt +++ b/urlhandler/CMakeLists.txt @@ -9,7 +9,7 @@ target_link_libraries(kdeconnect-handler kdeconnectinterfaces kdeconnectcore kdeconnectversion - Qt5::Widgets + Qt::Widgets KF5::CoreAddons KF5::DBusAddons KF5::I18n