Cleanup all occurences of QT_MAJOR_VERSION in cmake

Follow-up to 7f03aa548c

Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
This commit is contained in:
Andreas Sturmlechner 2023-12-28 17:37:31 +01:00
parent 3ddf4dafa6
commit 79bc9a85e4
40 changed files with 127 additions and 158 deletions

View file

@ -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(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" DESCRIPTION "QtQuick plugins to build user interfaces based on KDE UX guidelines"
PURPOSE "Required for KDE Connect's QML-based GUI applications" PURPOSE "Required for KDE Connect's QML-based GUI applications"
URL "https://www.kde.org/products/kirigami/" URL "https://www.kde.org/products/kirigami/"
TYPE RUNTIME TYPE RUNTIME
) )
find_package(KF${QT_MAJOR_VERSION}KirigamiAddons 0.11 REQUIRED) find_package(KF6KirigamiAddons 0.11 REQUIRED)
set_package_properties(KF${QT_MAJOR_VERSION}KirigamiAddons PROPERTIES set_package_properties(KF6KirigamiAddons PROPERTIES
TYPE REQUIRED TYPE REQUIRED
PURPOSE "Required runtime dependency (all the modules are required)" PURPOSE "Required runtime dependency (all the modules are required)"
) )
@ -70,13 +70,13 @@ else()
endif() endif()
if(UNIX AND NOT APPLE) if(UNIX AND NOT APPLE)
find_package(KF${QT_MAJOR_VERSION}Package REQUIRED) find_package(KF6Package REQUIRED)
if (WITH_PULSEAUDIO) if (WITH_PULSEAUDIO)
find_package(KF${QT_MAJOR_VERSION}PulseAudioQt REQUIRED) find_package(KF6PulseAudioQt REQUIRED)
endif() endif()
find_package(QtWaylandScanner REQUIRED) find_package(QtWaylandScanner REQUIRED)
find_package(Wayland 1.9 REQUIRED Client) 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) find_package(WaylandProtocols REQUIRED)
pkg_check_modules(XkbCommon IMPORTED_TARGET xkbcommon) pkg_check_modules(XkbCommon IMPORTED_TARGET xkbcommon)
find_package(PkgConfig QUIET REQUIRED) find_package(PkgConfig QUIET REQUIRED)
@ -90,7 +90,7 @@ set_package_properties(KF5PeopleVCard PROPERTIES
TYPE RUNTIME TYPE RUNTIME
) )
if (QT_MAJOR_VERSION STREQUAL "6" AND NOT WIN32) if (NOT WIN32)
find_package(KF6StatusNotifierItem ${KF_MIN_VERSION} REQUIRED) find_package(KF6StatusNotifierItem ${KF_MIN_VERSION} REQUIRED)
endif() 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) 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) find_package(Qt6 ${QT_MIN_VERSION} REQUIRED COMPONENTS DBus Quick QuickControls2 Network Multimedia)
if (UNIX AND NOT APPLE AND QT_MAJOR_VERSION EQUAL "5") find_package(KF6 ${KF_MIN_VERSION} REQUIRED COMPONENTS ${KF5_REQUIRED_COMPONENTS})
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS X11Extras)
endif()
find_package(KF${QT_MAJOR_VERSION} ${KF_MIN_VERSION} REQUIRED COMPONENTS ${KF5_REQUIRED_COMPONENTS})
if (WIN32) if (WIN32)
get_filename_component(WINDOWS_KITS_DIR get_filename_component(WINDOWS_KITS_DIR
@ -118,8 +115,8 @@ add_subdirectory(core)
add_subdirectory(plugins) add_subdirectory(plugins)
add_subdirectory(interfaces) add_subdirectory(interfaces)
find_package(KF${QT_MAJOR_VERSION}QQC2DesktopStyle ${KF_MIN_VERSION} REQUIRED) find_package(KF6QQC2DesktopStyle ${KF_MIN_VERSION} REQUIRED)
set_package_properties(KF${QT_MAJOR_VERSION}QQC2DesktopStyle PROPERTIES TYPE RUNTIME) set_package_properties(KF6QQC2DesktopStyle PROPERTIES TYPE RUNTIME)
add_subdirectory(icons) add_subdirectory(icons)
add_subdirectory(data) add_subdirectory(data)

View file

@ -46,7 +46,7 @@ ecm_target_qml_sources(kdeconnect-app SOURCES
qml/Settings.qml 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(TARGETS kdeconnect-app ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(PROGRAMS org.kde.kdeconnect.app.desktop DESTINATION ${KDE_INSTALL_APPDIR}) install(PROGRAMS org.kde.kdeconnect.app.desktop DESTINATION ${KDE_INSTALL_APPDIR})

View file

@ -7,8 +7,8 @@ target_link_libraries(kdeconnect-cli
kdeconnectinterfaces kdeconnectinterfaces
kdeconnectcore kdeconnectcore
kdeconnectversion kdeconnectversion
KF${QT_MAJOR_VERSION}::CoreAddons KF6::CoreAddons
KF${QT_MAJOR_VERSION}::I18n KF6::I18n
) )
install(TARGETS kdeconnect-cli ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) install(TARGETS kdeconnect-cli ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})

View file

@ -14,7 +14,7 @@ add_subdirectory(backends/loopback)
option(BLUETOOTH_ENABLED "Bluetooth support for kdeconnect" ON) option(BLUETOOTH_ENABLED "Bluetooth support for kdeconnect" ON)
if(BLUETOOTH_ENABLED) 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) add_subdirectory(backends/bluetooth)
endif() endif()
@ -58,14 +58,14 @@ find_package(OpenSSL REQUIRED COMPONENTS Crypto)
target_link_libraries(kdeconnectcore target_link_libraries(kdeconnectcore
PUBLIC PUBLIC
Qt::Network Qt::Network
KF${QT_MAJOR_VERSION}::CoreAddons KF6::CoreAddons
KF${QT_MAJOR_VERSION}::KIOCore KF6::KIOCore
KF${QT_MAJOR_VERSION}::KIOGui KF6::KIOGui
OpenSSL::Crypto OpenSSL::Crypto
PRIVATE PRIVATE
Qt::DBus Qt::DBus
KF${QT_MAJOR_VERSION}::I18n KF6::I18n
KF${QT_MAJOR_VERSION}::ConfigCore KF6::ConfigCore
) )
if(WIN32) if(WIN32)
@ -74,7 +74,7 @@ endif()
if (BLUETOOTH_ENABLED) if (BLUETOOTH_ENABLED)
target_compile_definitions(kdeconnectcore PRIVATE -DKDECONNECT_BLUETOOTH) 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() endif()
if (LOOPBACK_ENABLED) if (LOOPBACK_ENABLED)

View file

@ -8,11 +8,11 @@ ecm_qt_declare_logging_category(kdeconnectd
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (daemon)") EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (daemon)")
target_link_libraries(kdeconnectd target_link_libraries(kdeconnectd
kdeconnectcore kdeconnectversion kdeconnectcore kdeconnectversion
KF${QT_MAJOR_VERSION}::KIOWidgets KF6::KIOWidgets
KF${QT_MAJOR_VERSION}::DBusAddons KF6::DBusAddons
KF${QT_MAJOR_VERSION}::Notifications KF6::Notifications
KF${QT_MAJOR_VERSION}::I18n KF6::I18n
KF${QT_MAJOR_VERSION}::WindowSystem KF6::WindowSystem
Qt::Widgets) Qt::Widgets)
ecm_mark_nongui_executable(kdeconnectd) ecm_mark_nongui_executable(kdeconnectd)

View file

@ -15,22 +15,10 @@ ecm_target_qml_sources(kdeconnectdeclarativeplugin
VERSION 1.0) VERSION 1.0)
if(UNIX AND NOT APPLE) 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 qt6_generate_wayland_protocol_client_sources(kdeconnectdeclarativeplugin FILES
${WaylandProtocols_DATADIR}/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml) ${WaylandProtocols_DATADIR}/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml)
qt6_generate_wayland_protocol_client_sources(kdeconnectdeclarativeplugin FILES qt6_generate_wayland_protocol_client_sources(kdeconnectdeclarativeplugin FILES
${WaylandProtocols_DATADIR}/unstable/relative-pointer/relative-pointer-unstable-v1.xml) ${WaylandProtocols_DATADIR}/unstable/relative-pointer/relative-pointer-unstable-v1.xml)
endif()
target_sources(kdeconnectdeclarativeplugin PRIVATE ${wayland_SRCS}) target_sources(kdeconnectdeclarativeplugin PRIVATE ${wayland_SRCS})
target_link_libraries(kdeconnectdeclarativeplugin PRIVATE Wayland::Client Qt::WaylandClient Qt::GuiPrivate) target_link_libraries(kdeconnectdeclarativeplugin PRIVATE Wayland::Client Qt::WaylandClient Qt::GuiPrivate)

View file

@ -9,9 +9,9 @@ ecm_qt_declare_logging_category(kdeconnectfileitemaction
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (fileitemaction)") EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (fileitemaction)")
target_link_libraries( target_link_libraries(
kdeconnectfileitemaction kdeconnectfileitemaction
KF${QT_MAJOR_VERSION}::KIOWidgets KF6::KIOWidgets
KF${QT_MAJOR_VERSION}::I18n KF6::I18n
kdeconnectinterfaces kdeconnectinterfaces
kdeconnectcore kdeconnectcore
) )
install(TARGETS kdeconnectfileitemaction DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf${QT_MAJOR_VERSION}/kfileitemaction) install(TARGETS kdeconnectfileitemaction DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf6/kfileitemaction)

View file

@ -43,13 +43,11 @@ ecm_qt_declare_logging_category(kdeconnect-indicator
target_include_directories(kdeconnect-indicator PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/systray_actions) 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) if (WIN32)
target_link_libraries(kdeconnect-indicator windowsapp) target_link_libraries(kdeconnect-indicator windowsapp)
endif() else()
if (QT_MAJOR_VERSION STREQUAL "6" AND NOT WIN32)
target_link_libraries(kdeconnect-indicator KF6::StatusNotifierItem) target_link_libraries(kdeconnect-indicator KF6::StatusNotifierItem)
endif() endif()

View file

@ -102,12 +102,12 @@ target_link_libraries(kdeconnectinterfaces
LINK_PUBLIC LINK_PUBLIC
Qt::Gui Qt::Gui
Qt::DBus Qt::DBus
KF${QT_MAJOR_VERSION}::ConfigCore KF6::ConfigCore
LINK_PRIVATE LINK_PRIVATE
kdeconnectcore kdeconnectcore
KF${QT_MAJOR_VERSION}::I18n KF6::I18n
kdeconnectcore kdeconnectcore
KF${QT_MAJOR_VERSION}::CoreAddons KF6::CoreAddons
) )
install(TARGETS kdeconnectinterfaces EXPORT kdeconnectLibraryTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP) install(TARGETS kdeconnectinterfaces EXPORT kdeconnectLibraryTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)

View file

@ -9,8 +9,8 @@ ki18n_wrap_ui(kcm_kdeconnect kcm.ui)
target_link_libraries(kcm_kdeconnect target_link_libraries(kcm_kdeconnect
Qt::Core Qt::Core
Qt::Gui Qt::Gui
KF${QT_MAJOR_VERSION}::I18n KF6::I18n
KF${QT_MAJOR_VERSION}::KCMUtils KF6::KCMUtils
kdeconnectinterfaces kdeconnectinterfaces
kdeconnectversion kdeconnectversion
) )

View file

@ -4,12 +4,12 @@ add_library(kdeconnectpluginkcm kdeconnectpluginkcm.cpp)
target_link_libraries(kdeconnectpluginkcm target_link_libraries(kdeconnectpluginkcm
PUBLIC PUBLIC
kdeconnectcore kdeconnectcore
KF${QT_MAJOR_VERSION}::KCMUtils KF6::KCMUtils
PRIVATE PRIVATE
Qt::DBus Qt::DBus
Qt::Gui Qt::Gui
KF${QT_MAJOR_VERSION}::I18n KF6::I18n
KF${QT_MAJOR_VERSION}::ConfigCore KF6::ConfigCore
) )
set_target_properties(kdeconnectpluginkcm PROPERTIES set_target_properties(kdeconnectpluginkcm PROPERTIES

View file

@ -1,6 +1,6 @@
add_definitions(-DTRANSLATION_DOMAIN="kdeconnect-kio") 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") set_target_properties(kio_kdeconnect PROPERTIES OUTPUT_NAME "kdeconnect")
ecm_qt_declare_logging_category(kio_kdeconnect ecm_qt_declare_logging_category(kio_kdeconnect
@ -14,6 +14,6 @@ target_link_libraries(kio_kdeconnect
kdeconnectinterfaces kdeconnectinterfaces
Qt::Core Qt::Core
Qt::Network Qt::Network
KF${QT_MAJOR_VERSION}::KIOCore KF6::KIOCore
KF${QT_MAJOR_VERSION}::I18n KF6::I18n
) )

View file

@ -39,8 +39,8 @@ add_subdirectory(screensaver-inhibit)
add_subdirectory(virtualmonitor) add_subdirectory(virtualmonitor)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
find_package(KF${QT_MAJOR_VERSION}ModemManagerQt ${KF_MIN_VERSION}) find_package(KF6ModemManagerQt ${KF_MIN_VERSION})
if (TARGET KF${QT_MAJOR_VERSION}::ModemManagerQt) if (TARGET KF6::ModemManagerQt)
add_subdirectory(mmtelephony) add_subdirectory(mmtelephony)
endif() endif()
endif() endif()

View file

@ -2,6 +2,6 @@ kdeconnect_add_plugin(kdeconnect_battery SOURCES batteryplugin.cpp)
target_link_libraries(kdeconnect_battery target_link_libraries(kdeconnect_battery
kdeconnectcore kdeconnectcore
Qt::DBus Qt::DBus
KF${QT_MAJOR_VERSION}::Solid KF6::Solid
KF${QT_MAJOR_VERSION}::I18n KF6::I18n
) )

View file

@ -3,4 +3,4 @@ target_link_libraries(kdeconnect_bigscreen
kdeconnectcore kdeconnectcore
kdeconnectinterfaces kdeconnectinterfaces
Qt::DBus Qt::DBus
KF${QT_MAJOR_VERSION}::I18n) KF6::I18n)

View file

@ -2,7 +2,7 @@ kdeconnect_add_plugin(kdeconnect_clipboard SOURCES clipboardplugin.cpp clipboard
target_link_libraries(kdeconnect_clipboard kdeconnectcore target_link_libraries(kdeconnect_clipboard kdeconnectcore
Qt::DBus Qt::DBus
KF${QT_MAJOR_VERSION}::GuiAddons KF6::GuiAddons
${kdeconnect_clipboard_WL_LINK_LIBS} ${kdeconnect_clipboard_WL_LINK_LIBS}
) )
@ -11,6 +11,6 @@ ki18n_wrap_ui(kdeconnect_clipboard_config clipboard_config.ui)
target_link_libraries(kdeconnect_clipboard_config target_link_libraries(kdeconnect_clipboard_config
kdeconnectcore kdeconnectcore
kdeconnectpluginkcm kdeconnectpluginkcm
KF${QT_MAJOR_VERSION}::I18n KF6::I18n
KF${QT_MAJOR_VERSION}::KCMUtils KF6::KCMUtils
) )

View file

@ -2,6 +2,6 @@ kdeconnect_add_plugin(kdeconnect_connectivity_report SOURCES connectivity_report
target_link_libraries(kdeconnect_connectivity_report target_link_libraries(kdeconnect_connectivity_report
kdeconnectcore kdeconnectcore
Qt::DBus Qt::DBus
KF${QT_MAJOR_VERSION}::Solid KF6::Solid
KF${QT_MAJOR_VERSION}::I18n KF6::I18n
) )

View file

@ -9,7 +9,7 @@ target_link_libraries(kdeconnect_findthisdevice
if (NOT WIN32) if (NOT WIN32)
target_link_libraries(kdeconnect_findthisdevice target_link_libraries(kdeconnect_findthisdevice
KF${QT_MAJOR_VERSION}::PulseAudioQt KF6::PulseAudioQt
) )
endif() endif()
@ -19,8 +19,8 @@ ki18n_wrap_ui(kdeconnect_findthisdevice_config findthisdevice_config.ui)
target_link_libraries(kdeconnect_findthisdevice_config target_link_libraries(kdeconnect_findthisdevice_config
kdeconnectpluginkcm kdeconnectpluginkcm
Qt::Multimedia Qt::Multimedia
KF${QT_MAJOR_VERSION}::I18n KF6::I18n
KF${QT_MAJOR_VERSION}::CoreAddons KF6::CoreAddons
KF${QT_MAJOR_VERSION}::ConfigWidgets KF6::ConfigWidgets
KF${QT_MAJOR_VERSION}::KIOWidgets # KUrlRequester KF6::KIOWidgets # KUrlRequester
) )

View file

@ -9,5 +9,5 @@ target_link_libraries(kdeconnect_lockdevice
kdeconnectcore kdeconnectcore
kdeconnectinterfaces kdeconnectinterfaces
Qt::DBus Qt::DBus
KF${QT_MAJOR_VERSION}::I18n KF6::I18n
) )

View file

@ -2,6 +2,6 @@ kdeconnect_add_plugin(kdeconnect_mmtelephony SOURCES mmtelephonyplugin.cpp)
target_link_libraries(kdeconnect_mmtelephony target_link_libraries(kdeconnect_mmtelephony
kdeconnectcore kdeconnectcore
Qt::DBus Qt::DBus
KF${QT_MAJOR_VERSION}::ModemManagerQt KF6::ModemManagerQt
KF${QT_MAJOR_VERSION}::I18n KF6::I18n
) )

View file

@ -13,9 +13,6 @@ if(UNIX AND NOT APPLE)
PURPOSE "Needed for the remote mouse input plugin" 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(XTest REQUIRED)
find_package(X11 REQUIRED) find_package(X11 REQUIRED)
target_include_directories(kdeconnect_mousepad PRIVATE ${XTEST_INCLUDE_DIRS} ${X11_INCLUDE_DIR} ${LibFakeKey_INCLUDE_DIRS}) 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) 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) if (WIN32)
target_sources(kdeconnect_mousepad PUBLIC windowsremoteinput.cpp) target_sources(kdeconnect_mousepad PUBLIC windowsremoteinput.cpp)
@ -32,12 +29,7 @@ endif()
if(WITH_X11) if(WITH_X11)
target_sources(kdeconnect_mousepad PUBLIC x11remoteinput.cpp) target_sources(kdeconnect_mousepad PUBLIC x11remoteinput.cpp)
if (QT_MAJOR_VERSION EQUAL "5") target_link_libraries(kdeconnect_mousepad Qt6::GuiPrivate ${X11_LIBRARIES} ${XTEST_LIBRARIES} ${LibFakeKey_LIBRARIES})
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})
endif() endif()
if (APPLE) if (APPLE)

View file

@ -11,7 +11,7 @@ endif()
kdeconnect_add_plugin(kdeconnect_mpriscontrol SOURCES ${kdeconnect_mpriscontrol_SRCS}) kdeconnect_add_plugin(kdeconnect_mpriscontrol SOURCES ${kdeconnect_mpriscontrol_SRCS})
if(WIN32) if(WIN32)
target_link_libraries(kdeconnect_mpriscontrol kdeconnectcore windowsapp KF${QT_MAJOR_VERSION}::I18n) target_link_libraries(kdeconnect_mpriscontrol kdeconnectcore windowsapp KF6::I18n)
else() else()
target_link_libraries(kdeconnect_mpriscontrol Qt::DBus kdeconnectcore kdeconnectinterfaces) target_link_libraries(kdeconnect_mpriscontrol Qt::DBus kdeconnectcore kdeconnectinterfaces)
endif() endif()

View file

@ -5,15 +5,11 @@ target_link_libraries(kdeconnect_notifications
kdeconnectcore kdeconnectcore
Qt::DBus Qt::DBus
Qt::Widgets Qt::Widgets
KF${QT_MAJOR_VERSION}::Notifications KF6::Notifications
KF${QT_MAJOR_VERSION}::I18n KF6::I18n
KF${QT_MAJOR_VERSION}::WindowSystem KF6::WindowSystem
) )
if (UNIX AND NOT APPLE) 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) target_link_libraries(kdeconnect_notifications Qt6::GuiPrivate)
endif()
endif() endif()

View file

@ -15,7 +15,7 @@ target_link_libraries(kdeconnect_pausemusic
if (WIN32) if (WIN32)
target_link_libraries(kdeconnect_pausemusic windowsapp) target_link_libraries(kdeconnect_pausemusic windowsapp)
else() else()
target_link_libraries(kdeconnect_pausemusic KF${QT_MAJOR_VERSION}::PulseAudioQt) target_link_libraries(kdeconnect_pausemusic KF6::PulseAudioQt)
endif() endif()
####################################### #######################################
@ -27,6 +27,6 @@ ki18n_wrap_ui(kdeconnect_pausemusic_config pausemusic_config.ui)
target_link_libraries(kdeconnect_pausemusic_config target_link_libraries(kdeconnect_pausemusic_config
kdeconnectcore kdeconnectcore
kdeconnectpluginkcm kdeconnectpluginkcm
KF${QT_MAJOR_VERSION}::I18n KF6::I18n
KF${QT_MAJOR_VERSION}::KCMUtils KF6::KCMUtils
) )

View file

@ -2,5 +2,5 @@ kdeconnect_add_plugin(kdeconnect_ping SOURCES pingplugin.cpp)
target_link_libraries(kdeconnect_ping target_link_libraries(kdeconnect_ping
kdeconnectcore kdeconnectcore
Qt::DBus Qt::DBus
KF${QT_MAJOR_VERSION}::I18n KF6::I18n
) )

View file

@ -6,5 +6,5 @@ target_link_libraries(kdeconnect_presenter
kdeconnectcore kdeconnectcore
Qt::DBus Qt::DBus
Qt::Quick Qt::Quick
KF${QT_MAJOR_VERSION}::I18n KF6::I18n
) )

View file

@ -2,5 +2,5 @@ kdeconnect_add_plugin(kdeconnect_remotecontrol SOURCES remotecontrolplugin.cpp)
target_link_libraries(kdeconnect_remotecontrol target_link_libraries(kdeconnect_remotecontrol
kdeconnectcore kdeconnectcore
Qt::DBus Qt::DBus
KF${QT_MAJOR_VERSION}::I18n KF6::I18n
) )

View file

@ -2,5 +2,5 @@ kdeconnect_add_plugin(kdeconnect_remotesystemvolume SOURCES remotesystemvolumepl
target_link_libraries(kdeconnect_remotesystemvolume target_link_libraries(kdeconnect_remotesystemvolume
kdeconnectcore kdeconnectcore
Qt::DBus Qt::DBus
KF${QT_MAJOR_VERSION}::I18n KF6::I18n
) )

View file

@ -2,15 +2,15 @@ kdeconnect_add_plugin(kdeconnect_runcommand SOURCES runcommandplugin.cpp)
target_link_libraries(kdeconnect_runcommand target_link_libraries(kdeconnect_runcommand
kdeconnectcore kdeconnectcore
Qt::DBus Qt::DBus
KF${QT_MAJOR_VERSION}::KCMUtils KF6::KCMUtils
KF${QT_MAJOR_VERSION}::I18n) KF6::I18n)
#---------------------- #----------------------
kdeconnect_add_kcm(kdeconnect_runcommand_config SOURCES runcommand_config.cpp) kdeconnect_add_kcm(kdeconnect_runcommand_config SOURCES runcommand_config.cpp)
target_link_libraries(kdeconnect_runcommand_config target_link_libraries(kdeconnect_runcommand_config
kdeconnectcore kdeconnectcore
kdeconnectpluginkcm kdeconnectpluginkcm
KF${QT_MAJOR_VERSION}::I18n KF6::I18n
KF${QT_MAJOR_VERSION}::CoreAddons KF6::CoreAddons
KF${QT_MAJOR_VERSION}::ConfigWidgets KF6::ConfigWidgets
) )

View file

@ -18,7 +18,7 @@ target_link_libraries(kdeconnect_screensaver_inhibit kdeconnectcore kdeconnectin
if(NOT APPLE AND NOT WIN32) if(NOT APPLE AND NOT WIN32)
target_link_libraries(kdeconnect_screensaver_inhibit target_link_libraries(kdeconnect_screensaver_inhibit
Qt::DBus Qt::DBus
KF${QT_MAJOR_VERSION}::I18n KF6::I18n
) )
endif() endif()

View file

@ -8,10 +8,10 @@ target_sources(kdeconnect_sendnotifications PRIVATE
target_link_libraries(kdeconnect_sendnotifications target_link_libraries(kdeconnect_sendnotifications
kdeconnectcore kdeconnectcore
KF${QT_MAJOR_VERSION}::I18n KF6::I18n
Qt::Gui Qt::Gui
KF${QT_MAJOR_VERSION}::IconThemes KF6::IconThemes
KF${QT_MAJOR_VERSION}::ConfigCore KF6::ConfigCore
) )
@ -39,6 +39,6 @@ target_sources(kdeconnect_sendnotifications_config PRIVATE
target_link_libraries(kdeconnect_sendnotifications_config target_link_libraries(kdeconnect_sendnotifications_config
kdeconnectcore kdeconnectcore
kdeconnectpluginkcm kdeconnectpluginkcm
KF${QT_MAJOR_VERSION}::I18n KF6::I18n
KF${QT_MAJOR_VERSION}::KCMUtils KF6::KCMUtils
) )

View file

@ -18,8 +18,8 @@ kdeconnect_add_plugin(kdeconnect_sftp SOURCES ${kdeconnect_sftp_SRCS})
target_link_libraries(kdeconnect_sftp target_link_libraries(kdeconnect_sftp
kdeconnectcore kdeconnectcore
Qt::DBus Qt::DBus
KF${QT_MAJOR_VERSION}::I18n KF6::I18n
KF${QT_MAJOR_VERSION}::KIOFileWidgets KF6::KIOFileWidgets
KF${QT_MAJOR_VERSION}::KIOWidgets KF6::KIOWidgets
KF${QT_MAJOR_VERSION}::Notifications KF6::Notifications
) )

View file

@ -2,20 +2,20 @@ kdeconnect_add_plugin(kdeconnect_share SOURCES shareplugin.cpp)
target_link_libraries(kdeconnect_share target_link_libraries(kdeconnect_share
kdeconnectcore kdeconnectcore
Qt::DBus Qt::DBus
KF${QT_MAJOR_VERSION}::Notifications KF6::Notifications
KF${QT_MAJOR_VERSION}::I18n KF6::I18n
KF${QT_MAJOR_VERSION}::GuiAddons KF6::GuiAddons
KF${QT_MAJOR_VERSION}::KIOWidgets KF6::KIOWidgets
KF${QT_MAJOR_VERSION}::Service KF6::Service
) )
kdeconnect_add_kcm(kdeconnect_share_config SOURCES share_config.cpp) kdeconnect_add_kcm(kdeconnect_share_config SOURCES share_config.cpp)
ki18n_wrap_ui(kdeconnect_share_config share_config.ui) ki18n_wrap_ui(kdeconnect_share_config share_config.ui)
target_link_libraries(kdeconnect_share_config target_link_libraries(kdeconnect_share_config
kdeconnectpluginkcm kdeconnectpluginkcm
KF${QT_MAJOR_VERSION}::I18n KF6::I18n
KF${QT_MAJOR_VERSION}::CoreAddons KF6::CoreAddons
KF${QT_MAJOR_VERSION}::ConfigWidgets KF6::ConfigWidgets
KF${QT_MAJOR_VERSION}::KIOWidgets KF6::KIOWidgets
KF${QT_MAJOR_VERSION}::Notifications KF6::Notifications
) )

View file

@ -11,16 +11,14 @@ ecm_qt_declare_logging_category(kdeconnect_sms
DEFAULT_SEVERITY Warning DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (conversations)") EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (conversations)")
find_package(Qt6 REQUIRED COMPONENTS Core5Compat)
target_link_libraries(kdeconnect_sms target_link_libraries(kdeconnect_sms
kdeconnectcore kdeconnectcore
kdeconnectinterfaces kdeconnectinterfaces
Qt::DBus Qt::DBus
KF${QT_MAJOR_VERSION}::I18n KF6::I18n
KF${QT_MAJOR_VERSION}::Notifications KF6::Notifications
Qt::Widgets 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()

View file

@ -31,6 +31,6 @@ else()
target_link_libraries(kdeconnect_systemvolume target_link_libraries(kdeconnect_systemvolume
kdeconnectcore kdeconnectcore
Qt::Core Qt::Core
KF${QT_MAJOR_VERSION}::PulseAudioQt KF6::PulseAudioQt
) )
endif() endif()

View file

@ -1,7 +1,7 @@
kdeconnect_add_plugin(kdeconnect_telephony SOURCES telephonyplugin.cpp) kdeconnect_add_plugin(kdeconnect_telephony SOURCES telephonyplugin.cpp)
target_link_libraries(kdeconnect_telephony target_link_libraries(kdeconnect_telephony
kdeconnectcore kdeconnectcore
KF${QT_MAJOR_VERSION}::I18n KF6::I18n
KF${QT_MAJOR_VERSION}::Notifications KF6::Notifications
Qt::DBus Qt::DBus
) )

View file

@ -7,7 +7,7 @@ add_executable(kdeconnect-settings
${kdeconnect_custom_icons_SRCS} ${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(TARGETS kdeconnect-settings ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES org.kde.kdeconnect-settings.desktop DESTINATION ${KDE_INSTALL_APPDIR}) install(FILES org.kde.kdeconnect-settings.desktop DESTINATION ${KDE_INSTALL_APPDIR})

View file

@ -26,7 +26,7 @@ target_link_libraries(kdeconnectsmshelper
PUBLIC PUBLIC
Qt::Core Qt::Core
Qt::DBus Qt::DBus
KF${QT_MAJOR_VERSION}::People KF6::People
Qt::Qml Qt::Qml
kdeconnectinterfaces kdeconnectinterfaces
) )
@ -62,11 +62,11 @@ target_link_libraries(kdeconnect-sms PRIVATE
Qt::Quick Qt::Quick
Qt::QuickControls2 Qt::QuickControls2
Qt::Widgets Qt::Widgets
KF${QT_MAJOR_VERSION}::CoreAddons KF6::CoreAddons
KF${QT_MAJOR_VERSION}::DBusAddons KF6::DBusAddons
KF${QT_MAJOR_VERSION}::I18n KF6::I18n
KF${QT_MAJOR_VERSION}::People KF6::People
KF${QT_MAJOR_VERSION}::KCMUtils KF6::KCMUtils
) )
install(TARGETS kdeconnect-sms ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) install(TARGETS kdeconnect-sms ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})

View file

@ -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 set(kdeconnect_libraries
kdeconnectcore kdeconnectcore
kdeconnectinterfaces kdeconnectinterfaces
kdeconnectsmshelper kdeconnectsmshelper
kdeconnectversion kdeconnectversion
KF${QT_MAJOR_VERSION}::I18n KF6::I18n
KF${QT_MAJOR_VERSION}::KIOWidgets KF6::KIOWidgets
Qt::DBus Qt::DBus
Qt::Network Qt::Network
KF${QT_MAJOR_VERSION}::People KF6::People
Qt::Qml Qt::Qml
Qt::Test Qt::Test
) )

View file

@ -12,11 +12,11 @@ target_link_libraries(kdeconnect-handler
kdeconnectcore kdeconnectcore
kdeconnectversion kdeconnectversion
Qt::Widgets Qt::Widgets
KF${QT_MAJOR_VERSION}::CoreAddons KF6::CoreAddons
KF${QT_MAJOR_VERSION}::ConfigWidgets KF6::ConfigWidgets
KF${QT_MAJOR_VERSION}::DBusAddons KF6::DBusAddons
KF${QT_MAJOR_VERSION}::I18n KF6::I18n
KF${QT_MAJOR_VERSION}::KIOCore KF${QT_MAJOR_VERSION}::KIOFileWidgets KF${QT_MAJOR_VERSION}::KIOWidgets KF6::KIOCore KF6::KIOFileWidgets KF6::KIOWidgets
) )
install(TARGETS kdeconnect-handler ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) install(TARGETS kdeconnect-handler ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})