diff --git a/CMakeLists.txt b/CMakeLists.txt index 463b50e1b..db5522024 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,7 +78,7 @@ if(UNIX AND NOT APPLE) find_package(WaylandProtocols REQUIRED) pkg_check_modules(XkbCommon IMPORTED_TARGET xkbcommon) find_package(PkgConfig QUIET REQUIRED) - pkg_check_modules(DBus REQUIRED dbus-1) + pkg_check_modules(DBus REQUIRED IMPORTED_TARGET dbus-1) endif() if (NOT WIN32) diff --git a/plugins/sendnotifications/CMakeLists.txt b/plugins/sendnotifications/CMakeLists.txt index 373579aa3..3b80a4725 100644 --- a/plugins/sendnotifications/CMakeLists.txt +++ b/plugins/sendnotifications/CMakeLists.txt @@ -20,10 +20,7 @@ target_sources(kdeconnect_sendnotifications PRIVATE windowsnotificationslistener target_link_libraries(kdeconnect_sendnotifications runtimeobject windowsapp) else() target_sources(kdeconnect_sendnotifications PRIVATE dbusnotificationslistener.cpp) -target_link_libraries(kdeconnect_sendnotifications ${DBus_LIBRARIES}) -target_include_directories(kdeconnect_sendnotifications - SYSTEM PRIVATE ${DBus_INCLUDE_DIRS} -) +target_link_libraries(kdeconnect_sendnotifications PkgConfig::DBus) endif() # Config