Commit dcac1b4f 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 0a604174
add_executable(kscreen-console main.cpp console.cpp)
target_link_libraries(kscreen-console
Qt5::DBus
Qt5::Gui
Qt::DBus
Qt::Gui
KF5::CoreAddons
KF5::I18n
KF5::Screen)
......
......@@ -24,7 +24,7 @@ ecm_qt_declare_logging_category(kcm_kscreen_SRCS
add_library(kcm_kscreen MODULE ${kcm_kscreen_SRCS})
target_link_libraries(kcm_kscreen
Qt5::Sensors
Qt::Sensors
KF5::ConfigCore
KF5::CoreAddons
KF5::Declarative
......
......@@ -30,10 +30,10 @@ qt5_add_dbus_adaptor(kscreen_daemon_SRCS
add_library(kscreen MODULE ${kscreen_daemon_SRCS})
target_link_libraries(kscreen Qt5::Widgets
Qt5::DBus
Qt5::Quick
Qt5::Sensors
target_link_libraries(kscreen Qt::Widgets
Qt::DBus
Qt::Quick
Qt::Sensors
KF5::Declarative
KF5::Screen
KF5::DBusAddons
......
......@@ -10,8 +10,8 @@ add_library(plasma_applet_kscreen MODULE ${kscreenapplet_SRCS})
kcoreaddons_desktop_to_json(plasma_applet_kscreen package/metadata.desktop)
target_link_libraries(plasma_applet_kscreen
Qt5::Qml
Qt5::DBus
Qt::Qml
Qt::DBus
KF5::I18n
KF5::Plasma
KF5::Screen)
......
......@@ -23,7 +23,7 @@ macro(ADD_KDED_TEST testname)
add_executable(${testname} ${test_SRCS})
add_dependencies(${testname} kscreen) # make sure the dbus interfaces are generated
target_compile_definitions(${testname} PRIVATE "-DTEST_DATA=\"${CMAKE_CURRENT_SOURCE_DIR}/\"")
target_link_libraries(${testname} Qt5::Test Qt5::DBus Qt5::Gui Qt5::Sensors KF5::Screen KF5::CoreAddons)
target_link_libraries(${testname} Qt::Test Qt::DBus Qt::Gui Qt::Sensors KF5::Screen KF5::CoreAddons)
add_test(NAME kscreen-kded-${testname} COMMAND ${testname})
ecm_mark_as_test(${testname})
endmacro()
......
......@@ -10,10 +10,10 @@ add_executable(osdtest main.cpp
../../common/utils.cpp
)
target_link_libraries(osdtest Qt5::Core
Qt5::DBus
Qt5::Quick
Qt5::Qml
target_link_libraries(osdtest Qt::Core
Qt::DBus
Qt::Quick
Qt::Qml
KF5::Screen
KF5::I18n
KF5::Declarative
......
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