1
0
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:
Jonas Kvinge 2018-07-03 20:32:28 +02:00
parent a00b8b2dca
commit 602f9759bb
5 changed files with 10 additions and 4 deletions

View File

@ -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)

View File

@ -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

View File

@ -22,6 +22,7 @@
#cmakedefine HAVE_GIO
#cmakedefine HAVE_DBUS
#cmakedefine HAVE_X11
#cmakedefine HAVE_UDISKS2
#cmakedefine HAVE_ALSA
#cmakedefine HAVE_DEVICEKIT

View File

@ -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
}

View File

@ -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