Commit 0ecdecaa authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Use versionless Qt cmake target

This makes it easier to build against both Qt5 and Qt6

GIT_SILENT
parent ecfd5005
......@@ -10,5 +10,5 @@ set(colorpickerplugin_SRCS
install(FILES plugin/qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/private/colorpicker)
add_library(colorpickerplugin SHARED ${colorpickerplugin_SRCS})
target_link_libraries(colorpickerplugin Qt5::DBus Qt5::Gui Qt5::Qml Qt5::Widgets KF5::WindowSystem)
target_link_libraries(colorpickerplugin Qt::DBus Qt::Gui Qt::Qml Qt::Widgets KF5::WindowSystem)
install(TARGETS colorpickerplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/private/colorpicker)
......@@ -23,8 +23,8 @@ add_library(plasma_applet_comic MODULE ${comic_SRCS})
kcoreaddons_desktop_to_json(plasma_applet_comic package/metadata.desktop SERVICE_TYPES plasma-applet.desktop)
target_link_libraries(plasma_applet_comic
Qt5::Gui
Qt5::Widgets
Qt::Gui
Qt::Widgets
KF5::Plasma
KF5::I18n
KF5::KIOCore
......
......@@ -35,8 +35,8 @@ add_library(dictplugin SHARED ${dict_SRCS})
target_link_libraries(dictplugin
KF5::Plasma
KF5::I18n
Qt5::Quick
Qt5::WebEngine
Qt::Quick
Qt::WebEngine
)
install(FILES plugin/qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/private/dict)
......
......@@ -18,7 +18,7 @@ set(diskquota_SRCS
add_library(diskquotaplugin SHARED ${diskquota_SRCS})
target_link_libraries(diskquotaplugin
Qt5::Quick
Qt::Quick
KF5::CoreAddons
KF5::I18n)
......
......@@ -12,6 +12,6 @@ set(fifteenpuzzleplugin_SRCS
add_library(fifteenpuzzleplugin SHARED ${fifteenpuzzleplugin_SRCS})
target_link_libraries(fifteenpuzzleplugin Qt5::Quick Qt5::Qml)
target_link_libraries(fifteenpuzzleplugin Qt::Quick Qt::Qml)
install(TARGETS fifteenpuzzleplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/private/fifteenpuzzle)
install(FILES plugin/qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/private/fifteenpuzzle)
......@@ -12,10 +12,10 @@ add_library(org.kde.plasma.private.grouping MODULE groupingcontainment.cpp ${gro
kcoreaddons_desktop_to_json(org.kde.plasma.private.grouping package/metadata.desktop)
target_link_libraries(org.kde.plasma.private.grouping
Qt5::Gui
Qt5::Quick
Qt5::DBus
Qt5::Widgets
Qt::Gui
Qt::Quick
Qt::DBus
Qt::Widgets
KF5::Plasma
KF5::XmlGui
KF5::I18n)
......
......@@ -14,8 +14,8 @@ kcoreaddons_desktop_to_json(org.kde.plasma.grouping package/metadata.desktop)
target_link_libraries(org.kde.plasma.grouping
Qt5::Gui
Qt5::Quick
Qt::Gui
Qt::Quick
KF5::Plasma
KF5::XmlGui
KF5::I18n)
......
......@@ -8,9 +8,9 @@ set(mediaframeplugin_SRCS
add_library(mediaframeplugin SHARED ${mediaframeplugin_SRCS})
target_link_libraries(mediaframeplugin
Qt5::Core
Qt5::Qml
Qt5::Quick
Qt::Core
Qt::Qml
Qt::Quick
KF5::I18n
KF5::KIOCore
)
......
......@@ -6,10 +6,10 @@ set(nightcolorcontrolplugin_SOURCES
add_library(nightcolorcontrolplugin SHARED ${nightcolorcontrolplugin_SOURCES})
target_link_libraries(nightcolorcontrolplugin
Qt5::Core
Qt5::DBus
Qt5::Gui
Qt5::Qml
Qt::Core
Qt::DBus
Qt::Gui
Qt::Qml
)
install(FILES qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/private/nightcolorcontrol)
......
......@@ -20,7 +20,7 @@ set(notes_SRCS
add_library(notesplugin SHARED ${notes_SRCS})
target_link_libraries(notesplugin
Qt5::Quick
Qt::Quick
KF5::CoreAddons)
install(TARGETS notesplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/private/notes)
......
......@@ -4,8 +4,8 @@ set(quicklaunchplugin_SRCS
add_library(quicklaunchplugin SHARED ${quicklaunchplugin_SRCS})
target_link_libraries(quicklaunchplugin
Qt5::Core
Qt5::Qml
Qt::Core
Qt::Qml
KF5::KIOCore
KF5::KIOWidgets
KF5::Notifications)
......
......@@ -9,8 +9,8 @@ qt5_add_dbus_interface(purposeplugin_SRCS ${activitymanagerslc_xml} activitymana
add_library(purposeplugin SHARED ${purposeplugin_SRCS})
target_link_libraries(purposeplugin
Qt5::Quick
Qt5::DBus
Qt::Quick
Qt::DBus
KF5::CoreAddons)
install(TARGETS purposeplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/private/purpose)
......
......@@ -10,8 +10,8 @@ set(timer_SRCS
add_library(timerplugin SHARED ${timer_SRCS})
target_link_libraries(timerplugin
Qt5::Core
Qt5::Qml
Qt::Core
Qt::Qml
KF5::CoreAddons
)
......
......@@ -34,7 +34,7 @@ target_link_libraries(weatherplugin
KF5::Plasma
KF5::UnitConversion
KF5::I18n
Qt5::Qml
Qt::Qml
)
install(TARGETS weatherplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/private/weather)
......
......@@ -69,7 +69,7 @@ set(plasma_comic_krossprovider_SRCS
add_library(plasma_comic_krossprovider MODULE ${plasma_comic_krossprovider_SRCS})
target_link_libraries(plasma_comic_krossprovider plasmacomicprovidercore
Qt5::Gui
Qt::Gui
KF5::KIOCore
KF5::KrossCore
KF5::KrossUi
......
......@@ -31,7 +31,7 @@ set_target_properties(plasmapotdprovidercore PROPERTIES
SOVERSION ${POTDPROVIDER_VERSION_MAJOR}
EXPORT_NAME PotdProvider
)
target_link_libraries( plasmapotdprovidercore Qt5::Gui KF5::CoreAddons )
target_link_libraries( plasmapotdprovidercore Qt::Gui KF5::CoreAddons )
target_include_directories(plasmapotdprovidercore
PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>"
INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR}>"
......
add_library(plasmacalendarastronomicaleventsconfig SHARED configplugin.cpp configstorage.cpp)
target_link_libraries(plasmacalendarastronomicaleventsconfig
Qt5::Qml
Qt5::Core
Qt::Qml
Qt::Core
KF5::ConfigCore
)
......
......@@ -7,7 +7,7 @@ target_link_libraries(krunner_converter_static
KF5::I18n
KF5::Runner
KF5::UnitConversion
Qt5::Widgets
Qt::Widgets
)
add_library(krunner_converter MODULE plugin.cpp)
......
......@@ -2,4 +2,4 @@ remove_definitions(-DQT_NO_CAST_FROM_ASCII)
include(ECMAddTests)
ecm_add_test(converterrunnertest.cpp TEST_NAME converterrunnertest LINK_LIBRARIES Qt5::Test krunner_converter_static)
ecm_add_test(converterrunnertest.cpp TEST_NAME converterrunnertest LINK_LIBRARIES Qt::Test krunner_converter_static)
......@@ -11,7 +11,7 @@ set(kcm_krunner_spellcheck_SRCS
ki18n_wrap_ui(kcm_krunner_spellcheck_SRCS spellcheck_config.ui)
add_library(kcm_krunner_spellcheck MODULE ${kcm_krunner_spellcheck_SRCS})
target_link_libraries(kcm_krunner_spellcheck
Qt5::Gui
Qt::Gui
KF5::Runner
KF5::KCMUtils
KF5::I18n
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment