Commit 2ba2ee7f 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 07051593
......@@ -21,7 +21,7 @@ qt5_add_dbus_adaptor(
)
add_library(libboltfakeserver STATIC ${libboltfakeserver_SRCS})
target_link_libraries(libboltfakeserver Qt5::Core Qt5::DBus Qt5::Test)
target_link_libraries(libboltfakeserver Qt::Core Qt::DBus Qt::Test)
set_target_properties(libboltfakeserver PROPERTIES OUTPUT_NAME boltfakeserver CXX_STANDARD 14)
target_include_directories(libboltfakeserver PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>;$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>")
......@@ -32,4 +32,4 @@ set(boltfakeserver_SRCS
)
add_executable(boltfakeserver ${boltfakeserver_SRCS})
target_link_libraries(boltfakeserver libboltfakeserver Qt5::Core Qt5::DBus)
target_link_libraries(boltfakeserver libboltfakeserver Qt::Core Qt::DBus)
......@@ -10,7 +10,7 @@ ecm_add_test(
${CMAKE_SOURCE_DIR}/src/kded/kded_bolt.cpp
${CMAKE_BINARY_DIR}/src/kded/kded_bolt_debug.cpp
TEST_NAME kdedtest
LINK_LIBRARIES kbolt libboltfakeserver Qt5::Test Qt5::Core Qt5::DBus KF5::CoreAddons KF5::DBusAddons KF5::I18n KF5::Notifications
LINK_LIBRARIES kbolt libboltfakeserver Qt::Test Qt::Core Qt::DBus KF5::CoreAddons KF5::DBusAddons KF5::I18n KF5::Notifications
NAME_PREFIX kbolt-kded-
)
set_target_properties(kdedtest PROPERTIES CXX_STANDARD 14)
......
......@@ -3,7 +3,7 @@ include(ECMAddTests)
macro(add_libkbolt_test name)
ecm_add_test(
${name}.cpp
LINK_LIBRARIES kbolt libboltfakeserver Qt5::Test Qt5::Core Qt5::DBus
LINK_LIBRARIES kbolt libboltfakeserver Qt::Test Qt::Core Qt::DBus
NAME_PREFIX libkbolt-
)
set_target_properties(${name} PROPERTIES CXX_STANDARD 14)
......
......@@ -25,8 +25,8 @@ add_library(kbolt SHARED ${LIBKBOLT_SRCS})
set_target_properties(kbolt PROPERTIES CXX_STANDARD 14)
generate_export_header(kbolt)
target_link_libraries(kbolt
Qt5::Core
Qt5::DBus
Qt::Core
Qt::DBus
KF5::I18n
)
......
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