Commit 21d8e4aa 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 a9da4f42
......@@ -71,9 +71,9 @@ add_library(breezedecoration MODULE
target_link_libraries(breezedecoration
PUBLIC
Qt5::Core
Qt5::Gui
Qt5::DBus
Qt::Core
Qt::Gui
Qt::DBus
PRIVATE
breezecommon5
KDecoration2::KDecoration
......@@ -88,7 +88,7 @@ target_link_libraries(breezedecoration
if(BREEZE_HAVE_X11)
target_link_libraries(breezedecoration
PUBLIC
Qt5::X11Extras
Qt::X11Extras
XCB::XCB)
endif()
......
......@@ -81,12 +81,12 @@ set(breeze_PART_SRCS
kconfig_add_kcfg_files(breeze_PART_SRCS ../kdecoration/breezesettings.kcfgc)
kconfig_add_kcfg_files(breeze_PART_SRCS breezestyleconfigdata.kcfgc)
add_library(breeze MODULE ${breeze_PART_SRCS})
target_link_libraries(breeze Qt5::Core Qt5::Gui Qt5::Widgets Qt5::DBus)
target_link_libraries(breeze Qt::Core Qt::Gui Qt::Widgets Qt::DBus)
if( BREEZE_HAVE_QTQUICK )
target_link_libraries(breeze Qt5::Quick)
target_link_libraries(breeze Qt::Quick)
endif()
if (BREEZE_HAVE_QTX11EXTRAS)
target_link_libraries(breeze Qt5::X11Extras)
target_link_libraries(breeze Qt::X11Extras)
endif()
target_link_libraries(breeze KF5::ConfigCore KF5::ConfigWidgets KF5::GuiAddons KF5::IconThemes KF5::WindowSystem)
target_link_libraries(breeze breezecommon5)
......
......@@ -13,7 +13,7 @@ add_library(kstyle_breeze_config MODULE
${kstyle_breeze_config_PART_FORMS_HEADERS}
)
target_link_libraries(kstyle_breeze_config Qt5::Core Qt5::Gui Qt5::Widgets Qt5::DBus)
target_link_libraries(kstyle_breeze_config Qt::Core Qt::Gui Qt::Widgets Qt::DBus)
target_link_libraries(kstyle_breeze_config KF5::ConfigCore KF5::ConfigWidgets KF5::I18n)
install(TARGETS kstyle_breeze_config DESTINATION ${QT_PLUGIN_INSTALL_DIR})
install(FILES breezestyleconfig.desktop DESTINATION ${SERVICES_INSTALL_DIR})
......@@ -29,7 +29,7 @@ set_package_properties(KF5KCMUtils PROPERTIES
if( KF5KCMUtils_FOUND )
set(breeze_settings_SOURCES main.cpp)
add_executable(breeze-settings5 ${breeze_settings_SOURCES} )
target_link_libraries(breeze-settings5 Qt5::Core Qt5::Gui Qt5::Widgets )
target_link_libraries(breeze-settings5 Qt::Core Qt::Gui Qt::Widgets )
target_link_libraries(breeze-settings5 KF5::I18n KF5::KCMUtils)
install(TARGETS breeze-settings5 ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
......
......@@ -15,8 +15,8 @@ generate_export_header(breezecommon5
target_link_libraries(breezecommon5
PUBLIC
Qt5::Core
Qt5::Gui)
Qt::Core
Qt::Gui)
set_target_properties(breezecommon5 PROPERTIES
VERSION ${PROJECT_VERSION}
......
......@@ -9,7 +9,7 @@ set(kde4breeze_SRCS
add_executable(kde4breeze ${kde4breeze_SRCS})
# Select which libraries we need to link to
target_link_libraries(kde4breeze Qt5::Widgets KF5::CoreAddons KF5::ConfigCore)
target_link_libraries(kde4breeze Qt::Widgets KF5::CoreAddons KF5::ConfigCore)
# Tell cmake to install the application binary
install(TARGETS kde4breeze DESTINATION ${LIB_INSTALL_DIR}/kconf_update_bin/)
......
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