mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2025-01-12 16:14:44 +01:00
Fix dbus compile without X11
This commit is contained in:
parent
a00b8b2dca
commit
602f9759bb
@ -91,6 +91,9 @@ if(ALSA_FOUND)
|
||||
set(HAVE_ALSA ON)
|
||||
endif()
|
||||
find_package(X11)
|
||||
if(X11_FOUND)
|
||||
set(HAVE_X11 ON)
|
||||
endif()
|
||||
pkg_check_modules(GSTREAMER gstreamer-1.0)
|
||||
pkg_check_modules(GSTREAMER_BASE gstreamer-base-1.0)
|
||||
pkg_check_modules(GSTREAMER_AUDIO gstreamer-audio-1.0)
|
||||
|
@ -491,7 +491,7 @@ optional_source(HAVE_ALSA
|
||||
)
|
||||
|
||||
# X11
|
||||
optional_source(X11_FOUND SOURCES widgets/osd_x11.cpp)
|
||||
optional_source(HAVE_X11 SOURCES widgets/osd_x11.cpp)
|
||||
|
||||
# GStreamer
|
||||
optional_source(HAVE_GSTREAMER
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#cmakedefine HAVE_GIO
|
||||
#cmakedefine HAVE_DBUS
|
||||
#cmakedefine HAVE_X11
|
||||
#cmakedefine HAVE_UDISKS2
|
||||
#cmakedefine HAVE_ALSA
|
||||
#cmakedefine HAVE_DEVICEKIT
|
||||
|
@ -27,6 +27,7 @@
|
||||
# include <gst/gstelement.h>
|
||||
#endif
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QAbstractSocket>
|
||||
#include <QMetaType>
|
||||
#include <QList>
|
||||
@ -100,7 +101,6 @@ void RegisterMetaTypes() {
|
||||
qRegisterMetaTypeStreamOperators<Equalizer::Params>("Equalizer::Params");
|
||||
#ifdef HAVE_DBUS
|
||||
qDBusRegisterMetaType<QList<QByteArray>>();
|
||||
qDBusRegisterMetaType<QImage>();
|
||||
qDBusRegisterMetaType<TrackMetadata>();
|
||||
qDBusRegisterMetaType<TrackIds>();
|
||||
qDBusRegisterMetaType<MprisPlaylist>();
|
||||
@ -108,7 +108,9 @@ void RegisterMetaTypes() {
|
||||
qDBusRegisterMetaType<MaybePlaylist>();
|
||||
qDBusRegisterMetaType<InterfacesAndProperties>();
|
||||
qDBusRegisterMetaType<ManagedObjectList>();
|
||||
#ifdef HAVE_X11
|
||||
qDBusRegisterMetaType<QImage>();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
@ -240,7 +240,7 @@ void OSD::ShowMessage(const QString &summary, const QString &message, const QStr
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef HAVE_DBUS
|
||||
#if !defined(HAVE_X11) && defined(HAVE_DBUS)
|
||||
void OSD::CallFinished(QDBusPendingCallWatcher*) {}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user