Allow building with dbus on uncommon platforms

Rather than hard-out ban dbus on non linux/bsd, make it be used if
found, but don't fail at cmake stage if not available
This commit is contained in:
Sune Vuorela 2024-05-28 09:16:41 +02:00
parent f9063084ef
commit fc72976017

View file

@ -147,13 +147,11 @@ else()
endif()
if (BUILD_DESKTOP)
find_package(Qt6DBus)
set(HAVE_DBUS ${Qt6DBus_FOUND})
if(UNIX AND NOT APPLE AND NOT ANDROID)
find_package(Qt6DBus)
set_okular_optional_package_properties(Qt6DBus PROPERTIES
PURPOSE "Required for interprocess communication, external open in same instance and various presentation related bits.")
set(HAVE_DBUS ${Qt6DBus_FOUND})
else()
set(HAVE_DBUS 0)
endif()
find_package(KF6 ${KF_REQUIRED_VERSION} REQUIRED COMPONENTS Parts ColorScheme Crash IconThemes ItemViews TextWidgets WidgetsAddons)