Commit 290624d1 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 75b0d49e
......@@ -72,9 +72,9 @@ add_library(oxygendecoration MODULE
target_link_libraries(oxygendecoration
PUBLIC
Qt5::Core
Qt5::Gui
Qt5::DBus
Qt::Core
Qt::Gui
Qt::DBus
PRIVATE
oxygenstyle5
oxygenstyleconfig5
......@@ -89,7 +89,7 @@ target_link_libraries(oxygendecoration
if(OXYGEN_HAVE_X11)
target_link_libraries(oxygendecoration
PUBLIC
Qt5::X11Extras
Qt::X11Extras
XCB::XCB)
endif()
......
......@@ -69,13 +69,13 @@ set(oxygen_PART_SRCS
kconfig_add_kcfg_files(oxygen_PART_SRCS oxygenstyleconfigdata.kcfgc)
add_library(oxygen MODULE ${oxygen_PART_SRCS})
target_link_libraries(oxygen Qt5::Core Qt5::Gui Qt5::Widgets Qt5::DBus Qt5::Quick)
target_link_libraries(oxygen Qt::Core Qt::Gui Qt::Widgets Qt::DBus Qt::Quick)
target_link_libraries(oxygen KF5::GuiAddons KF5::Style KF5::WindowSystem)
target_link_libraries(oxygen oxygenstyle5)
if(OXYGEN_HAVE_X11)
target_link_libraries(oxygen XCB::XCB)
target_link_libraries(oxygen Qt5::X11Extras)
target_link_libraries(oxygen Qt::X11Extras)
endif()
if(OXYGEN_HAVE_KWAYLAND)
......
......@@ -27,7 +27,7 @@ add_library(kstyle_oxygen_config MODULE
${kstyle_oxygen_config_PART_FORMS_HEADERS}
)
target_link_libraries(kstyle_oxygen_config Qt5::Core Qt5::Gui Qt5::Widgets Qt5::DBus)
target_link_libraries(kstyle_oxygen_config Qt::Core Qt::Gui Qt::Widgets Qt::DBus)
target_link_libraries(kstyle_oxygen_config KF5::Completion KF5::I18n)
target_link_libraries(kstyle_oxygen_config oxygenstyleconfig5)
......@@ -45,7 +45,7 @@ set_package_properties(KF5KCMUtils PROPERTIES
if( KF5KCMUtils_FOUND )
set(oxygen_settings_SOURCES main.cpp)
add_executable(oxygen-settings5 ${oxygen_settings_SOURCES} )
target_link_libraries(oxygen-settings5 Qt5::Core Qt5::Gui Qt5::Widgets )
target_link_libraries(oxygen-settings5 Qt::Core Qt::Gui Qt::Widgets )
target_link_libraries(oxygen-settings5 KF5::I18n KF5::KCMUtils)
install(TARGETS oxygen-settings5 ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
......
......@@ -42,7 +42,7 @@ add_executable(oxygen-demo5
${oxygen_demo_FORMS_HEADERS}
)
target_link_libraries(oxygen-demo5 Qt5::Core Qt5::Gui Qt5::Widgets)
target_link_libraries(oxygen-demo5 Qt::Core Qt::Gui Qt::Widgets)
target_link_libraries(oxygen-demo5 KF5::Completion KF5::ConfigGui KF5::WidgetsAddons KF5::I18n)
if(KF5ConfigWidgets_FOUND)
target_link_libraries(oxygen-demo5 KF5::ConfigWidgets)
......
......@@ -24,9 +24,9 @@ generate_export_header(oxygenstyle5 BASE_NAME oxygen EXPORT_FILE_NAME oxygen_exp
# interface, since other Oxygen targets link to this library
target_link_libraries(oxygenstyle5
PUBLIC
Qt5::Core
Qt5::Gui
Qt5::Widgets
Qt::Core
Qt::Gui
Qt::Widgets
KF5::ConfigCore
KF5::ConfigWidgets
KF5::WindowSystem
......@@ -37,7 +37,7 @@ target_link_libraries(oxygenstyle5
target_include_directories(oxygenstyle5 PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>")
if(OXYGEN_HAVE_X11)
target_link_libraries(oxygenstyle5 PRIVATE XCB::XCB Qt5::X11Extras)
target_link_libraries(oxygenstyle5 PRIVATE XCB::XCB Qt::X11Extras)
endif()
set_target_properties(oxygenstyle5 PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
......@@ -81,9 +81,9 @@ generate_export_header(oxygenstyleconfig5 BASE_NAME oxygen_config EXPORT_FILE_NA
target_link_libraries(oxygenstyleconfig5
PUBLIC
oxygenstyle5
Qt5::Core
Qt5::Gui
Qt5::Widgets
Qt::Core
Qt::Gui
Qt::Widgets
PRIVATE
KF5::I18n
)
......
Markdown is supported
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