Commit d66e6413 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 263eb768
......@@ -102,7 +102,7 @@ if(HAVE_WIRELESS_SUPPORT)
endif()
if (XCB_FOUND) # kwin kscreen helper effect
target_link_libraries(powerdevilcore Qt5::X11Extras XCB::XCB)
target_link_libraries(powerdevilcore Qt::X11Extras XCB::XCB)
endif ()
# target no.2 - powerdevil kded module
......@@ -123,7 +123,7 @@ qt5_add_dbus_adaptor(powerdevil_SRCS org.freedesktop.PowerManagement.Inhibit.xml
# KAuth charge threshold helper
add_executable(chargethresholdhelper chargethresholdhelper.cpp powerdevil_debug.cpp ${chargethresholdhelper_mocs})
target_link_libraries(chargethresholdhelper Qt5::Core KF5::AuthCore)
target_link_libraries(chargethresholdhelper Qt::Core KF5::AuthCore)
install(TARGETS chargethresholdhelper DESTINATION ${KAUTH_HELPER_INSTALL_DIR})
kauth_install_helper_files(chargethresholdhelper org.kde.powerdevil.chargethresholdhelper root)
kauth_install_actions(org.kde.powerdevil.chargethresholdhelper chargethreshold_helper_actions.actions)
......@@ -146,7 +146,7 @@ target_link_libraries(powerdevil
powerdevilcore
)
if (XCB_FOUND)
target_link_libraries(powerdevil Qt5::X11Extras)
target_link_libraries(powerdevil Qt::X11Extras)
endif ()
target_link_libraries(powerdevil ${UDEV_LIBS})
......@@ -177,7 +177,7 @@ set_target_properties(powerdevilui PROPERTIES VERSION ${PROJECT_VERSION} SOVERSI
# not exported, so just make the deps public
target_link_libraries(powerdevilui
PUBLIC
Qt5::Widgets
Qt::Widgets
KF5::ConfigCore
)
......
......@@ -5,7 +5,7 @@ function(add_powerdevil_bundled_action _name)
target_link_libraries(powerdevil${_name}action_config
powerdevilcore
powerdevilui
Qt5::Widgets
Qt::Widgets
KF5::CoreAddons
KF5::I18n
KF5::ConfigGui
......@@ -33,7 +33,7 @@ add_library(powerdevilhandlebuttoneventsaction_config MODULE
target_link_libraries(powerdevilhandlebuttoneventsaction_config
powerdevilcore
powerdevilui
Qt5::Widgets
Qt::Widgets
KF5::CoreAddons
KF5::I18n
KF5::ConfigGui
......
......@@ -13,14 +13,14 @@ set(powerdevildpmsaction_SRCS
add_library(powerdevildpmsaction MODULE ${powerdevildpmsaction_SRCS})
target_link_libraries(powerdevildpmsaction
Qt5::X11Extras
Qt::X11Extras
XCB::XCB
XCB::DPMS
KF5::CoreAddons
KF5::ConfigGui
KF5::I18n
KF5::WaylandClient
Qt5::Widgets
Qt::Widgets
powerdevilcore)
install(TARGETS powerdevildpmsaction DESTINATION ${KDE_INSTALL_PLUGINDIR})
install(FILES powerdevildpmsaction.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
......@@ -33,6 +33,6 @@ target_link_libraries(powerdevildpmsaction_config
KF5::CoreAddons
KF5::ConfigGui
KF5::I18n
Qt5::Widgets
Qt::Widgets
powerdevilui)
install(TARGETS powerdevildpmsaction_config DESTINATION ${KDE_INSTALL_PLUGINDIR})
......@@ -28,14 +28,14 @@ upower_kbdbacklight_interface)
## backlight helper executable
add_executable(backlighthelper upower/backlighthelper.cpp ${CMAKE_CURRENT_BINARY_DIR}/../powerdevil_debug.cpp ${backlighthelper_mocs})
target_link_libraries(backlighthelper Qt5::Core KF5::AuthCore KF5::I18n)
target_link_libraries(backlighthelper Qt::Core KF5::AuthCore KF5::I18n)
install(TARGETS backlighthelper DESTINATION ${KAUTH_HELPER_INSTALL_DIR})
kauth_install_helper_files(backlighthelper org.kde.powerdevil.backlighthelper root)
kauth_install_actions(org.kde.powerdevil.backlighthelper ${CMAKE_CURRENT_SOURCE_DIR}/upower/backlight_helper_actions.actions)
## discrete gpu helper executable
add_executable(discretegpuhelper upower/discretegpuhelper.cpp ${CMAKE_CURRENT_BINARY_DIR}/../powerdevil_debug.cpp ${discretegpuhelper_mocs})
target_link_libraries(discretegpuhelper Qt5::Core KF5::AuthCore)
target_link_libraries(discretegpuhelper Qt::Core KF5::AuthCore)
install(TARGETS discretegpuhelper DESTINATION ${KAUTH_HELPER_INSTALL_DIR})
kauth_install_helper_files(discretegpuhelper org.kde.powerdevil.discretegpuhelper root)
kauth_install_actions(org.kde.powerdevil.discretegpuhelper ${CMAKE_CURRENT_SOURCE_DIR}/upower/discretegpu_helper_actions.actions)
......@@ -43,7 +43,7 @@ kauth_install_actions(org.kde.powerdevil.discretegpuhelper ${CMAKE_CURRENT_SOURC
add_library(powerdevilupowerbackend ${powerdevilupowerbackend_SRCS})
set_target_properties(powerdevilupowerbackend PROPERTIES PREFIX "")
target_link_libraries(powerdevilupowerbackend
Qt5::Widgets
Qt::Widgets
KF5::AuthCore
KF5::ConfigCore
KF5::CoreAddons
......
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