Commit 299cc6c6 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 dce61c6e
......@@ -28,7 +28,7 @@ macro(FRAMEWORKINTEGRATION_TESTS _testname)
ecm_mark_as_test(${_testname})
ecm_mark_nongui_executable(${_testname})
target_include_directories(${_testname} PRIVATE ${CMAKE_BINARY_DIR}/src/platformtheme)
target_link_libraries(${_testname} Qt5::GuiPrivate Qt5::Test Qt5::DBus Qt5::X11Extras Qt5::QuickControls2 ${QT5PLATFORMSUPPORT_LIBS} KF5::ConfigWidgets KF5::ConfigCore KF5::IconThemes KF5::KIOFileWidgets KF5::I18n KF5::Notifications KF5::WindowSystem KF5::WaylandClient XCB::XCB)
target_link_libraries(${_testname} Qt::GuiPrivate Qt::Test Qt::DBus Qt::X11Extras Qt::QuickControls2 ${QT5PLATFORMSUPPORT_LIBS} KF5::ConfigWidgets KF5::ConfigCore KF5::IconThemes KF5::KIOFileWidgets KF5::I18n KF5::Notifications KF5::WindowSystem KF5::WaylandClient XCB::XCB)
endmacro()
set(dbus_interface)
......@@ -90,5 +90,5 @@ if(Qt5Qml_FOUND)
add_test(NAME qmltests COMMAND qmltestrunner WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
frameworkintegration_tests(kfiledialogqml_unittest)
target_link_libraries(kfiledialogqml_unittest Qt5::Qml)
target_link_libraries(kfiledialogqml_unittest Qt::Qml)
endif()
get_target_property(PLUGIN_DIR Qt5::Gui IMPORTED_LOCATION_UNUSED)
get_target_property(PLUGIN_DIR Qt::Gui IMPORTED_LOCATION_UNUSED)
# keyholdmanager has a ton of definitions where
# needing explicit qstringliteral would negatively affect
......@@ -11,11 +11,11 @@ add_library(input_plugin MODULE
)
target_link_libraries(input_plugin
Qt5::Core
Qt5::Gui
Qt5::Quick
Qt5::Widgets
Qt5::GuiPrivate
Qt::Core
Qt::Gui
Qt::Quick
Qt::Widgets
Qt::GuiPrivate
KF5::ConfigCore
)
set_target_properties(input_plugin PROPERTIES OUTPUT_NAME plasmaimplatforminputcontextplugin)
......
......@@ -39,10 +39,10 @@ add_library(KDEPlasmaPlatformTheme MODULE ${platformtheme_SRCS})
target_link_libraries(KDEPlasmaPlatformTheme
PRIVATE
Qt5::GuiPrivate
Qt5::DBus
Qt5::X11Extras
Qt5::QuickControls2
Qt::GuiPrivate
Qt::DBus
Qt::X11Extras
Qt::QuickControls2
KF5::ConfigWidgets
KF5::ConfigCore
KF5::IconThemes
......@@ -58,7 +58,7 @@ target_link_libraries(KDEPlasmaPlatformTheme
)
if(HAVE_X11)
target_link_libraries(KDEPlasmaPlatformTheme PRIVATE Qt5::X11Extras ${X11_Xcursor_LIB} ${XCB_XCB_LIBRARY})
target_link_libraries(KDEPlasmaPlatformTheme PRIVATE Qt::X11Extras ${X11_Xcursor_LIB} ${XCB_XCB_LIBRARY})
endif()
set_target_properties(KDEPlasmaPlatformTheme PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/platformthemes/")
......
add_executable(qfiledialogtest qfiledialogtest.cpp)
target_link_libraries(qfiledialogtest Qt5::Core Qt5::Widgets)
target_link_libraries(qfiledialogtest Qt::Core Qt::Widgets)
add_executable(windowdecotest windowdecotest.cpp)
target_link_libraries(windowdecotest Qt5::Core Qt5::Widgets KF5::ConfigWidgets)
target_link_libraries(windowdecotest Qt::Core Qt::Widgets KF5::ConfigWidgets)
add_executable(systraymenuexclusiveactionstest systraymenuexclusiveactionstest.cpp)
target_link_libraries(systraymenuexclusiveactionstest Qt5::Core Qt5::Widgets)
target_link_libraries(systraymenuexclusiveactionstest Qt::Core Qt::Widgets)
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