From c5bfc4a5b03dc363f524e77c2c344deac0721edc Mon Sep 17 00:00:00 2001 From: Alexander Lohnau Date: Sat, 15 Apr 2023 12:57:52 +0200 Subject: [PATCH] Allow building against Qt6/KF6 --- CMakeLists.txt | 10 +++++----- app/CMakeLists.txt | 6 +++--- cli/CMakeLists.txt | 4 ++-- core/CMakeLists.txt | 14 +++++++++----- daemon/CMakeLists.txt | 12 ++++++------ fileitemactionplugin/CMakeLists.txt | 4 ++-- indicator/CMakeLists.txt | 4 ++-- interfaces/CMakeLists.txt | 6 +++--- kcm/CMakeLists.txt | 4 ++-- kcmplugin/CMakeLists.txt | 6 +++--- kio/CMakeLists.txt | 4 ++-- plugins/CMakeLists.txt | 4 ++-- plugins/battery/CMakeLists.txt | 4 ++-- plugins/bigscreen/CMakeLists.txt | 2 +- plugins/clipboard/CMakeLists.txt | 6 +++--- plugins/connectivity-report/CMakeLists.txt | 4 ++-- plugins/findthisdevice/CMakeLists.txt | 10 +++++----- plugins/lockdevice/CMakeLists.txt | 2 +- plugins/mmtelephony/CMakeLists.txt | 4 ++-- plugins/mousepad/CMakeLists.txt | 4 ++-- plugins/notifications/CMakeLists.txt | 6 +++--- plugins/pausemusic/CMakeLists.txt | 6 +++--- plugins/ping/CMakeLists.txt | 2 +- plugins/presenter/CMakeLists.txt | 4 ++-- plugins/remotecontrol/CMakeLists.txt | 2 +- plugins/remotesystemvolume/CMakeLists.txt | 2 +- plugins/runcommand/CMakeLists.txt | 10 +++++----- plugins/screensaver-inhibit/CMakeLists.txt | 2 +- plugins/sendnotifications/CMakeLists.txt | 10 +++++----- plugins/sftp/CMakeLists.txt | 8 ++++---- plugins/share/CMakeLists.txt | 20 ++++++++++---------- plugins/sms/CMakeLists.txt | 4 ++-- plugins/systemvolume/CMakeLists.txt | 2 +- plugins/telephony/CMakeLists.txt | 4 ++-- settings/CMakeLists.txt | 4 ++-- smsapp/CMakeLists.txt | 14 +++++++------- tests/CMakeLists.txt | 4 ++-- urlhandler/CMakeLists.txt | 10 +++++----- 38 files changed, 116 insertions(+), 112 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8801ab1af..9ec132e1e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,9 +68,9 @@ else() endif() if(UNIX AND NOT APPLE) - find_package(KF5Package REQUIRED) + find_package(KF${QT_MAJOR_VERSION}Package REQUIRED) if (WITH_PULSEAUDIO) - find_package(KF5PulseAudioQt) + find_package(KF${QT_MAJOR_VERSION}PulseAudioQt) endif() find_package(QtWaylandScanner REQUIRED) find_package(Wayland 1.9 REQUIRED Client) @@ -96,7 +96,7 @@ find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED COMPONENTS DBus Qu 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}) +find_package(KF${QT_MAJOR_VERSION} ${KF5_MIN_VERSION} REQUIRED COMPONENTS ${KF5_REQUIRED_COMPONENTS}) if (WIN32) get_filename_component(WINDOWS_KITS_DIR @@ -111,8 +111,8 @@ add_subdirectory(core) add_subdirectory(plugins) add_subdirectory(interfaces) -find_package(KF5QQC2DesktopStyle ${KF5_MIN_VERSION} REQUIRED) -set_package_properties(KF5QQC2DesktopStyle PROPERTIES TYPE RUNTIME) +find_package(KF${QT_MAJOR_VERSION}QQC2DesktopStyle ${KF5_MIN_VERSION} REQUIRED) +set_package_properties(KF${QT_MAJOR_VERSION}QQC2DesktopStyle PROPERTIES TYPE RUNTIME) add_subdirectory(icons) add_subdirectory(data) diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 8ed923ae8..c34279603 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -1,6 +1,6 @@ -qt5_add_resources(kdeconnect_SRCS resources.qrc) +qt_add_resources(kdeconnect_SRCS resources.qrc) -qt5_add_resources(kdeconnect_custom_icons_SRCS ${CMAKE_SOURCE_DIR}/icons/custom_icons.qrc) +qt_add_resources(kdeconnect_custom_icons_SRCS ${CMAKE_SOURCE_DIR}/icons/custom_icons.qrc) ecm_setup_version(${PROJECT_VERSION} VARIABLE_PREFIX KDE_CONNECT @@ -29,7 +29,7 @@ add_executable(kdeconnect-app ${kdeconnect_SRCS} ${kdeconnect_custom_icons_SRCS} ) -target_link_libraries(kdeconnect-app Qt::Quick Qt::QuickControls2 Qt::Widgets KF5::CoreAddons KF5::I18n KF5::KCMUtils) +target_link_libraries(kdeconnect-app Qt::Quick Qt::QuickControls2 Qt::Widgets KF${QT_MAJOR_VERSION}::CoreAddons KF${QT_MAJOR_VERSION}::I18n KF${QT_MAJOR_VERSION}::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 817945f81..07384be57 100644 --- a/cli/CMakeLists.txt +++ b/cli/CMakeLists.txt @@ -7,8 +7,8 @@ target_link_libraries(kdeconnect-cli kdeconnectinterfaces kdeconnectcore kdeconnectversion - KF5::CoreAddons - KF5::I18n + KF${QT_MAJOR_VERSION}::CoreAddons + KF${QT_MAJOR_VERSION}::I18n ) install(TARGETS kdeconnect-cli ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index e68535fa5..4aa4b30c5 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -62,20 +62,24 @@ target_include_directories(kdeconnectcore PUBLIC ${PROJECT_SOURCE_DIR}) target_link_libraries(kdeconnectcore PUBLIC Qt${QT_MAJOR_VERSION}::Network - KF5::CoreAddons + KF${QT_MAJOR_VERSION}::CoreAddons ${Qca_LIBRARY} - KF5::KIOCore - KF5::KIOGui + KF${QT_MAJOR_VERSION}::KIOCore + KF${QT_MAJOR_VERSION}::KIOGui PRIVATE Qt${QT_MAJOR_VERSION}::DBus - KF5::I18n - KF5::ConfigCore + KF${QT_MAJOR_VERSION}::I18n + KF${QT_MAJOR_VERSION}::ConfigCore ) if(WIN32) target_link_libraries(kdeconnectcore PRIVATE ws2_32.lib) # winsock2 endif() +if(KF5KIO_FOUND OR KF6KIO_FOUND) + target_link_libraries(kdeconnectcore PUBLIC KF${QT_MAJOR_VERSION}::KIOCore KF${QT_MAJOR_VERSION}::KIOGui) +endif() + if (BLUETOOTH_ENABLED) target_compile_definitions(kdeconnectcore PRIVATE -DKDECONNECT_BLUETOOTH) target_link_libraries(kdeconnectcore PRIVATE Qt5::Bluetooth) diff --git a/daemon/CMakeLists.txt b/daemon/CMakeLists.txt index 1652238b7..e9d7e65b0 100644 --- a/daemon/CMakeLists.txt +++ b/daemon/CMakeLists.txt @@ -7,16 +7,16 @@ ecm_qt_declare_logging_category( DEFAULT_SEVERITY Warning EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (daemon)") -qt5_add_resources(kdeconnect_custom_icons_SRCS ${CMAKE_SOURCE_DIR}/icons/custom_icons.qrc) +qt_add_resources(kdeconnect_custom_icons_SRCS ${CMAKE_SOURCE_DIR}/icons/custom_icons.qrc) add_executable(kdeconnectd kdeconnectd.cpp ${kdeconnect_custom_icons_SRCS} ${debug_file_SRCS}) target_link_libraries(kdeconnectd kdeconnectcore kdeconnectversion - KF5::KIOWidgets - KF5::DBusAddons - KF5::Notifications - KF5::I18n - KF5::WindowSystem + 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 Qt::Widgets) ecm_mark_nongui_executable(kdeconnectd) diff --git a/fileitemactionplugin/CMakeLists.txt b/fileitemactionplugin/CMakeLists.txt index 8efef4e74..59478b7b7 100644 --- a/fileitemactionplugin/CMakeLists.txt +++ b/fileitemactionplugin/CMakeLists.txt @@ -10,8 +10,8 @@ ecm_qt_declare_logging_category( add_library(kdeconnectfileitemaction MODULE sendfileitemaction.cpp ${debug_file_SRCS}) target_link_libraries( kdeconnectfileitemaction - KF5::KIOWidgets - KF5::I18n + KF${QT_MAJOR_VERSION}::KIOWidgets + KF${QT_MAJOR_VERSION}::I18n kdeconnectinterfaces kdeconnectcore ) diff --git a/indicator/CMakeLists.txt b/indicator/CMakeLists.txt index 8741d09e9..558437850 100644 --- a/indicator/CMakeLists.txt +++ b/indicator/CMakeLists.txt @@ -7,7 +7,7 @@ ecm_qt_declare_logging_category( DEFAULT_SEVERITY Warning EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (indicator)") -qt5_add_resources(kdeconnect_custom_icons_SRCS ${CMAKE_SOURCE_DIR}/icons/custom_icons.qrc) +qt_add_resources(kdeconnect_custom_icons_SRCS ${CMAKE_SOURCE_DIR}/icons/custom_icons.qrc) set(indicator_SRCS main.cpp @@ -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 Qt::Widgets KF5::CoreAddons KF5::I18n KF5::Notifications KF5::DBusAddons KF5::KCMUtils kdeconnectinterfaces kdeconnectcore kdeconnectversion) +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) if (WIN32) target_link_libraries(kdeconnect-indicator windowsapp) diff --git a/interfaces/CMakeLists.txt b/interfaces/CMakeLists.txt index c4ca2b6e5..d0de3b5d9 100644 --- a/interfaces/CMakeLists.txt +++ b/interfaces/CMakeLists.txt @@ -72,12 +72,12 @@ target_link_libraries(kdeconnectinterfaces LINK_PUBLIC Qt${QT_MAJOR_VERSION}::Gui Qt${QT_MAJOR_VERSION}::DBus - KF5::ConfigCore + KF${QT_MAJOR_VERSION}::ConfigCore LINK_PRIVATE kdeconnectcore - KF5::I18n + KF${QT_MAJOR_VERSION}::I18n kdeconnectcore - KF5::CoreAddons + KF${QT_MAJOR_VERSION}::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 ad105f267..44fee9dda 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 - KF5::I18n - KF5::KCMUtils + KF${QT_MAJOR_VERSION}::I18n + KF${QT_MAJOR_VERSION}::KCMUtils kdeconnectinterfaces kdeconnectversion ) diff --git a/kcmplugin/CMakeLists.txt b/kcmplugin/CMakeLists.txt index a18529f80..266e091a2 100644 --- a/kcmplugin/CMakeLists.txt +++ b/kcmplugin/CMakeLists.txt @@ -7,9 +7,9 @@ PUBLIC PRIVATE Qt::DBus Qt::Gui - KF5::I18n - KF5::ConfigCore - KF5::KCMUtils + KF${QT_MAJOR_VERSION}::I18n + KF${QT_MAJOR_VERSION}::ConfigCore + KF${QT_MAJOR_VERSION}::KCMUtils ) set_target_properties(kdeconnectpluginkcm PROPERTIES diff --git a/kio/CMakeLists.txt b/kio/CMakeLists.txt index bb8987d1a..16021b765 100644 --- a/kio/CMakeLists.txt +++ b/kio/CMakeLists.txt @@ -18,8 +18,8 @@ target_link_libraries(kio_kdeconnect kdeconnectinterfaces Qt::Core Qt::Network - KF5::KIOCore - KF5::I18n + KF${QT_MAJOR_VERSION}::KIOCore + KF${QT_MAJOR_VERSION}::I18n ) ########### install files ############### diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 89dfb675b..a68b47e4d 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -38,8 +38,8 @@ add_subdirectory(screensaver-inhibit) add_subdirectory(virtualmonitor) if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") - find_package(KF5ModemManagerQt ${KF5_MIN_VERSION}) - if (TARGET KF5::ModemManagerQt) + find_package(KF${QT_MAJOR_VERSION}ModemManagerQt ${KF5_MIN_VERSION}) + if (TARGET KF${QT_MAJOR_VERSION}::ModemManagerQt) add_subdirectory(mmtelephony) endif() endif() diff --git a/plugins/battery/CMakeLists.txt b/plugins/battery/CMakeLists.txt index 4e26245eb..c0e47f400 100644 --- a/plugins/battery/CMakeLists.txt +++ b/plugins/battery/CMakeLists.txt @@ -15,6 +15,6 @@ kdeconnect_add_plugin(kdeconnect_battery SOURCES ${kdeconnect_battery_SRCS}) target_link_libraries(kdeconnect_battery kdeconnectcore Qt${QT_MAJOR_VERSION}::DBus - KF5::Solid - KF5::I18n + KF${QT_MAJOR_VERSION}::Solid + KF${QT_MAJOR_VERSION}::I18n ) diff --git a/plugins/bigscreen/CMakeLists.txt b/plugins/bigscreen/CMakeLists.txt index 4a31db458..982cb6537 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 Qt${QT_MAJOR_VERSION}::DBus KF5::I18n) +target_link_libraries(kdeconnect_bigscreen kdeconnectcore Qt${QT_MAJOR_VERSION}::DBus KF${QT_MAJOR_VERSION}::I18n) diff --git a/plugins/clipboard/CMakeLists.txt b/plugins/clipboard/CMakeLists.txt index d610ee8f0..68577bc0a 100644 --- a/plugins/clipboard/CMakeLists.txt +++ b/plugins/clipboard/CMakeLists.txt @@ -15,7 +15,7 @@ set(kdeconnect_clipboard_SRCS kdeconnect_add_plugin(kdeconnect_clipboard SOURCES ${kdeconnect_clipboard_SRCS}) target_link_libraries(kdeconnect_clipboard kdeconnectcore - KF5::GuiAddons + KF${QT_MAJOR_VERSION}::GuiAddons Qt${QT_MAJOR_VERSION}::DBus ${kdeconnect_clipboard_WL_LINK_LIBS} ) @@ -27,6 +27,6 @@ target_sources(kdeconnect_clipboard_config PRIVATE clipboard_config.cpp ${debug_ target_link_libraries( kdeconnect_clipboard_config kdeconnectcore kdeconnectpluginkcm - KF5::I18n - KF5::KCMUtils + KF${QT_MAJOR_VERSION}::I18n + KF${QT_MAJOR_VERSION}::KCMUtils ) diff --git a/plugins/connectivity-report/CMakeLists.txt b/plugins/connectivity-report/CMakeLists.txt index 5d637f1ab..f8d18007a 100644 --- a/plugins/connectivity-report/CMakeLists.txt +++ b/plugins/connectivity-report/CMakeLists.txt @@ -15,6 +15,6 @@ kdeconnect_add_plugin(kdeconnect_connectivity_report SOURCES ${kdeconnect_connec target_link_libraries(kdeconnect_connectivity_report kdeconnectcore Qt${QT_MAJOR_VERSION}::DBus - KF5::Solid - KF5::I18n + KF${QT_MAJOR_VERSION}::Solid + KF${QT_MAJOR_VERSION}::I18n ) diff --git a/plugins/findthisdevice/CMakeLists.txt b/plugins/findthisdevice/CMakeLists.txt index 075c1d75f..af5c38970 100644 --- a/plugins/findthisdevice/CMakeLists.txt +++ b/plugins/findthisdevice/CMakeLists.txt @@ -22,7 +22,7 @@ target_link_libraries(kdeconnect_findthisdevice if (NOT WIN32) target_link_libraries(kdeconnect_findthisdevice - KF5::PulseAudioQt + KF${QT_MAJOR_VERSION}::PulseAudioQt ) endif() @@ -33,8 +33,8 @@ target_sources(kdeconnect_findthisdevice_config PRIVATE findthisdevice_config.cp target_link_libraries(kdeconnect_findthisdevice_config kdeconnectpluginkcm Qt::Multimedia - KF5::I18n - KF5::CoreAddons - KF5::ConfigWidgets - KF5::KIOWidgets # KUrlRequester + KF${QT_MAJOR_VERSION}::I18n + KF${QT_MAJOR_VERSION}::CoreAddons + KF${QT_MAJOR_VERSION}::ConfigWidgets + KF${QT_MAJOR_VERSION}::KIOWidgets # KUrlRequester ) diff --git a/plugins/lockdevice/CMakeLists.txt b/plugins/lockdevice/CMakeLists.txt index 132f6ebac..6ac52ffab 100644 --- a/plugins/lockdevice/CMakeLists.txt +++ b/plugins/lockdevice/CMakeLists.txt @@ -19,5 +19,5 @@ kdeconnect_add_plugin(kdeconnect_lockdevice SOURCES ${lockdevice_SRCS} ${debug_f target_link_libraries(kdeconnect_lockdevice kdeconnectcore Qt::DBus - KF5::I18n + KF${QT_MAJOR_VERSION}::I18n ) diff --git a/plugins/mmtelephony/CMakeLists.txt b/plugins/mmtelephony/CMakeLists.txt index c792b4c7c..c58d7e6ba 100644 --- a/plugins/mmtelephony/CMakeLists.txt +++ b/plugins/mmtelephony/CMakeLists.txt @@ -15,6 +15,6 @@ kdeconnect_add_plugin(kdeconnect_mmtelephony SOURCES ${kdeconnect_mmtelephony_SR target_link_libraries(kdeconnect_mmtelephony kdeconnectcore Qt${QT_MAJOR_VERSION}::DBus - KF5::ModemManagerQt - KF5::I18n + KF${QT_MAJOR_VERSION}::ModemManagerQt + KF${QT_MAJOR_VERSION}::I18n ) diff --git a/plugins/mousepad/CMakeLists.txt b/plugins/mousepad/CMakeLists.txt index c8984f1c1..63eb477f7 100644 --- a/plugins/mousepad/CMakeLists.txt +++ b/plugins/mousepad/CMakeLists.txt @@ -1,7 +1,7 @@ kdeconnect_add_plugin(kdeconnect_mousepad SOURCES mousepadplugin.cpp abstractremoteinput.cpp) if(UNIX AND NOT APPLE) - qt5_add_dbus_interface( + qt_add_dbus_interface( SRCS ${CMAKE_CURRENT_SOURCE_DIR}/xdp_dbus_remotedesktop_interface.xml xdp_dbus_remotedesktop_interface @@ -32,7 +32,7 @@ endif() configure_file(config-mousepad.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-mousepad.h) -target_link_libraries(kdeconnect_mousepad kdeconnectcore Qt::Gui KF5::I18n) +target_link_libraries(kdeconnect_mousepad kdeconnectcore Qt::Gui KF${QT_MAJOR_VERSION}::I18n) if (WIN32) target_sources(kdeconnect_mousepad PUBLIC windowsremoteinput.cpp) diff --git a/plugins/notifications/CMakeLists.txt b/plugins/notifications/CMakeLists.txt index b6ebb5a8b..8704704bf 100644 --- a/plugins/notifications/CMakeLists.txt +++ b/plugins/notifications/CMakeLists.txt @@ -19,9 +19,9 @@ kdeconnect_add_plugin(kdeconnect_notifications SOURCES ${kdeconnect_notification target_link_libraries(kdeconnect_notifications kdeconnectcore Qt::DBus - KF5::Notifications - KF5::I18n - KF5::WindowSystem + KF${QT_MAJOR_VERSION}::Notifications + KF${QT_MAJOR_VERSION}::I18n + KF${QT_MAJOR_VERSION}::WindowSystem ) if (UNIX AND NOT APPLE AND QT_MAJOR_VERSION EQUAL "5") diff --git a/plugins/pausemusic/CMakeLists.txt b/plugins/pausemusic/CMakeLists.txt index b9d8620a5..94105c2aa 100644 --- a/plugins/pausemusic/CMakeLists.txt +++ b/plugins/pausemusic/CMakeLists.txt @@ -26,7 +26,7 @@ target_link_libraries(kdeconnect_pausemusic ) if (NOT WIN32) target_link_libraries(kdeconnect_pausemusic - KF5::PulseAudioQt + KF${QT_MAJOR_VERSION}::PulseAudioQt ) else() target_link_libraries(kdeconnect_pausemusic @@ -47,6 +47,6 @@ ki18n_wrap_ui(kdeconnect_pausemusic_config pausemusic_config.ui) target_link_libraries( kdeconnect_pausemusic_config kdeconnectcore kdeconnectpluginkcm - KF5::I18n - KF5::KCMUtils + KF${QT_MAJOR_VERSION}::I18n + KF${QT_MAJOR_VERSION}::KCMUtils ) diff --git a/plugins/ping/CMakeLists.txt b/plugins/ping/CMakeLists.txt index 3b9cce3bd..27f4d116e 100644 --- a/plugins/ping/CMakeLists.txt +++ b/plugins/ping/CMakeLists.txt @@ -15,5 +15,5 @@ kdeconnect_add_plugin(kdeconnect_ping SOURCES ${kdeconnect_ping_SRCS}) target_link_libraries(kdeconnect_ping kdeconnectcore Qt${QT_MAJOR_VERSION}::DBus - KF5::I18n + KF${QT_MAJOR_VERSION}::I18n ) diff --git a/plugins/presenter/CMakeLists.txt b/plugins/presenter/CMakeLists.txt index f347ae2fb..c90cbbc7d 100644 --- a/plugins/presenter/CMakeLists.txt +++ b/plugins/presenter/CMakeLists.txt @@ -1,4 +1,4 @@ -qt5_add_resources(presenter_SRCS assets.qrc) +qt_add_resources(presenter_SRCS assets.qrc) set(debug_file_SRCS) ecm_qt_declare_logging_category( @@ -12,5 +12,5 @@ target_link_libraries(kdeconnect_presenter kdeconnectcore Qt${QT_MAJOR_VERSION}::DBus Qt${QT_MAJOR_VERSION}::Quick - KF5::I18n + KF${QT_MAJOR_VERSION}::I18n ) diff --git a/plugins/remotecontrol/CMakeLists.txt b/plugins/remotecontrol/CMakeLists.txt index e1a5df64f..bf93accb1 100644 --- a/plugins/remotecontrol/CMakeLists.txt +++ b/plugins/remotecontrol/CMakeLists.txt @@ -10,5 +10,5 @@ kdeconnect_add_plugin(kdeconnect_remotecontrol SOURCES remotecontrolplugin.cpp $ target_link_libraries(kdeconnect_remotecontrol kdeconnectcore Qt${QT_MAJOR_VERSION}::DBus - KF5::I18n + KF${QT_MAJOR_VERSION}::I18n ) diff --git a/plugins/remotesystemvolume/CMakeLists.txt b/plugins/remotesystemvolume/CMakeLists.txt index 63a342b32..f7066fdab 100644 --- a/plugins/remotesystemvolume/CMakeLists.txt +++ b/plugins/remotesystemvolume/CMakeLists.txt @@ -15,5 +15,5 @@ kdeconnect_add_plugin(kdeconnect_remotesystemvolume SOURCES ${kdeconnect_remotes target_link_libraries(kdeconnect_remotesystemvolume kdeconnectcore Qt${QT_MAJOR_VERSION}::DBus - KF5::I18n + KF${QT_MAJOR_VERSION}::I18n ) diff --git a/plugins/runcommand/CMakeLists.txt b/plugins/runcommand/CMakeLists.txt index b43cae2b5..6f4788a2f 100644 --- a/plugins/runcommand/CMakeLists.txt +++ b/plugins/runcommand/CMakeLists.txt @@ -15,15 +15,15 @@ kdeconnect_add_plugin(kdeconnect_runcommand SOURCES ${kdeconnect_runcommand_SRCS target_link_libraries(kdeconnect_runcommand kdeconnectcore Qt${QT_MAJOR_VERSION}::DBus - KF5::KCMUtils - KF5::I18n) + KF${QT_MAJOR_VERSION}::KCMUtils + KF${QT_MAJOR_VERSION}::I18n) #---------------------- kcoreaddons_add_plugin(kdeconnect_runcommand_config SOURCES runcommand_config.cpp INSTALL_NAMESPACE "kdeconnect/kcms") target_link_libraries( kdeconnect_runcommand_config kdeconnectcore kdeconnectpluginkcm - KF5::I18n - KF5::CoreAddons - KF5::ConfigWidgets + KF${QT_MAJOR_VERSION}::I18n + KF${QT_MAJOR_VERSION}::CoreAddons + KF${QT_MAJOR_VERSION}::ConfigWidgets ) diff --git a/plugins/screensaver-inhibit/CMakeLists.txt b/plugins/screensaver-inhibit/CMakeLists.txt index 3fad929ee..cc054554a 100644 --- a/plugins/screensaver-inhibit/CMakeLists.txt +++ b/plugins/screensaver-inhibit/CMakeLists.txt @@ -26,7 +26,7 @@ target_link_libraries(kdeconnect_screensaver_inhibit kdeconnectcore) if(NOT APPLE AND NOT WIN32) target_link_libraries(kdeconnect_screensaver_inhibit Qt::DBus - KF5::I18n + KF${QT_MAJOR_VERSION}::I18n ) endif() diff --git a/plugins/sendnotifications/CMakeLists.txt b/plugins/sendnotifications/CMakeLists.txt index b5fad9ec2..890255b06 100644 --- a/plugins/sendnotifications/CMakeLists.txt +++ b/plugins/sendnotifications/CMakeLists.txt @@ -18,10 +18,10 @@ kdeconnect_add_plugin(kdeconnect_sendnotifications SOURCES ${kdeconnect_sendnoti target_link_libraries(kdeconnect_sendnotifications kdeconnectcore Qt::DBus - KF5::I18n + KF${QT_MAJOR_VERSION}::I18n Qt::Gui - KF5::IconThemes - KF5::ConfigCore + KF${QT_MAJOR_VERSION}::IconThemes + KF${QT_MAJOR_VERSION}::ConfigCore PkgConfig::GIO ) @@ -40,6 +40,6 @@ target_sources(kdeconnect_sendnotifications_config PRIVATE target_link_libraries( kdeconnect_sendnotifications_config kdeconnectcore kdeconnectpluginkcm - KF5::I18n - KF5::KCMUtils + KF${QT_MAJOR_VERSION}::I18n + KF${QT_MAJOR_VERSION}::KCMUtils ) diff --git a/plugins/sftp/CMakeLists.txt b/plugins/sftp/CMakeLists.txt index 7bade2fcf..519b678be 100644 --- a/plugins/sftp/CMakeLists.txt +++ b/plugins/sftp/CMakeLists.txt @@ -26,8 +26,8 @@ kdeconnect_add_plugin(kdeconnect_sftp SOURCES ${kdeconnect_sftp_SRCS} ${debug_fi target_link_libraries(kdeconnect_sftp kdeconnectcore Qt::DBus - KF5::I18n - KF5::KIOFileWidgets - KF5::KIOWidgets - KF5::Notifications + KF${QT_MAJOR_VERSION}::I18n + KF${QT_MAJOR_VERSION}::KIOFileWidgets + KF${QT_MAJOR_VERSION}::KIOWidgets + KF${QT_MAJOR_VERSION}::Notifications ) diff --git a/plugins/share/CMakeLists.txt b/plugins/share/CMakeLists.txt index 71b86d565..87d6f205b 100644 --- a/plugins/share/CMakeLists.txt +++ b/plugins/share/CMakeLists.txt @@ -18,11 +18,11 @@ kdeconnect_add_plugin(kdeconnect_share SOURCES ${kdeconnect_share_SRCS}) target_link_libraries(kdeconnect_share kdeconnectcore Qt::DBus - KF5::Notifications - KF5::I18n - KF5::GuiAddons - KF5::KIOWidgets - KF5::Service + 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 ) ####################################### @@ -33,9 +33,9 @@ kcoreaddons_add_plugin(kdeconnect_share_config SOURCES share_config.cpp INSTALL_ ki18n_wrap_ui(kdeconnect_share_config share_config.ui) target_link_libraries(kdeconnect_share_config kdeconnectpluginkcm - KF5::I18n - KF5::CoreAddons - KF5::ConfigWidgets - KF5::KIOWidgets - KF5::Notifications + 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 ) diff --git a/plugins/sms/CMakeLists.txt b/plugins/sms/CMakeLists.txt index de6075bbe..6aaff1292 100644 --- a/plugins/sms/CMakeLists.txt +++ b/plugins/sms/CMakeLists.txt @@ -24,7 +24,7 @@ target_link_libraries(kdeconnect_sms kdeconnectcore kdeconnectinterfaces Qt::DBus - KF5::I18n - KF5::Notifications + KF${QT_MAJOR_VERSION}::I18n + KF${QT_MAJOR_VERSION}::Notifications Qt::Widgets ) diff --git a/plugins/systemvolume/CMakeLists.txt b/plugins/systemvolume/CMakeLists.txt index 164fe3bd5..b3b2af77e 100644 --- a/plugins/systemvolume/CMakeLists.txt +++ b/plugins/systemvolume/CMakeLists.txt @@ -39,6 +39,6 @@ else() target_link_libraries(kdeconnect_systemvolume kdeconnectcore Qt::Core - KF5::PulseAudioQt + KF${QT_MAJOR_VERSION}::PulseAudioQt ) endif() diff --git a/plugins/telephony/CMakeLists.txt b/plugins/telephony/CMakeLists.txt index c326212fc..559e1c703 100644 --- a/plugins/telephony/CMakeLists.txt +++ b/plugins/telephony/CMakeLists.txt @@ -14,7 +14,7 @@ kdeconnect_add_plugin(kdeconnect_telephony SOURCES ${kdeconnect_telephony_SRCS}) target_link_libraries(kdeconnect_telephony kdeconnectcore - KF5::I18n - KF5::Notifications + KF${QT_MAJOR_VERSION}::I18n + KF${QT_MAJOR_VERSION}::Notifications Qt::DBus ) diff --git a/settings/CMakeLists.txt b/settings/CMakeLists.txt index 4f135459f..97ccf34d7 100644 --- a/settings/CMakeLists.txt +++ b/settings/CMakeLists.txt @@ -1,13 +1,13 @@ add_definitions(-DTRANSLATION_DOMAIN="kdeconnect-settings") -qt5_add_resources(kdeconnect_custom_icons_SRCS ${CMAKE_SOURCE_DIR}/icons/custom_icons.qrc) +qt_add_resources(kdeconnect_custom_icons_SRCS ${CMAKE_SOURCE_DIR}/icons/custom_icons.qrc) add_executable(kdeconnect-settings main.cpp ${kdeconnect_custom_icons_SRCS} ) -target_link_libraries(kdeconnect-settings kdeconnectversion KF5::I18n KF5::KCMUtils KF5::DBusAddons KF5::WindowSystem) +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) 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 5470878a4..35cf79ab7 100644 --- a/smsapp/CMakeLists.txt +++ b/smsapp/CMakeLists.txt @@ -30,12 +30,12 @@ target_link_libraries(kdeconnectsmshelper PUBLIC Qt::Core Qt::DBus - KF5::People + KF${QT_MAJOR_VERSION}::People Qt::Qml kdeconnectinterfaces ) -qt5_add_resources(kdeconnect_custom_icons_SRCS ${CMAKE_SOURCE_DIR}/icons/custom_icons.qrc) +qt_add_resources(kdeconnect_custom_icons_SRCS ${CMAKE_SOURCE_DIR}/icons/custom_icons.qrc) add_executable(kdeconnect-sms main.cpp @@ -55,11 +55,11 @@ target_link_libraries(kdeconnect-sms Qt::Quick Qt::QuickControls2 Qt::Widgets - KF5::CoreAddons - KF5::DBusAddons - KF5::I18n - KF5::People - KF5::KCMUtils + 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 ) install(TARGETS kdeconnect-sms ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 1e0359dab..f833b098b 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -3,8 +3,8 @@ find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED COMPONENTS Test) set(kdeconnect_libraries kdeconnectcore kdeconnectversion - KF5::I18n - KF5::KIOWidgets + KF${QT_MAJOR_VERSION}::I18n + KF${QT_MAJOR_VERSION}::KIOWidgets Qt::DBus Qt::Network Qt::Test diff --git a/urlhandler/CMakeLists.txt b/urlhandler/CMakeLists.txt index aa10359e5..2a9dc8802 100644 --- a/urlhandler/CMakeLists.txt +++ b/urlhandler/CMakeLists.txt @@ -2,7 +2,7 @@ add_definitions(-DTRANSLATION_DOMAIN="kdeconnect-urlhandler") ki18n_wrap_ui(telhandler_SRCS dialog.ui) -qt5_add_resources(kdeconnect_custom_icons_SRCS ${CMAKE_SOURCE_DIR}/icons/custom_icons.qrc) +qt_add_resources(kdeconnect_custom_icons_SRCS ${CMAKE_SOURCE_DIR}/icons/custom_icons.qrc) add_executable(kdeconnect-handler kdeconnect-handler.cpp ${telhandler_SRCS} ${kdeconnect_custom_icons_SRCS}) @@ -12,10 +12,10 @@ target_link_libraries(kdeconnect-handler kdeconnectcore kdeconnectversion Qt::Widgets - KF5::CoreAddons - KF5::DBusAddons - KF5::I18n - KF5::KIOCore KF5::KIOFileWidgets KF5::KIOWidgets + KF${QT_MAJOR_VERSION}::CoreAddons + 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 ) install(TARGETS kdeconnect-handler ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})