mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-08 15:16:34 +02:00
Make liblastfm an optional dependency again
This commit is contained in:
@@ -20,7 +20,7 @@ INCLUDE( MacroLogFeature )
|
|||||||
|
|
||||||
# required
|
# required
|
||||||
macro_optional_find_package(LibLastFm 0.3.3)
|
macro_optional_find_package(LibLastFm 0.3.3)
|
||||||
macro_log_feature(LIBLASTFM_FOUND "LastFm" "Qt library for the Last.fm webservices" "https://github.com/mxcl/liblastfm" TRUE "" "liblastfm is needed for scrobbling tracks to Last.fm and fetching cover artwork")
|
macro_log_feature(LIBLASTFM_FOUND "LastFm" "Qt library for the Last.fm webservices" "https://github.com/mxcl/liblastfm" FALSE "" "liblastfm is needed for scrobbling tracks to Last.fm and fetching cover artwork")
|
||||||
|
|
||||||
macro_optional_find_package(LibEchonest 1.1.1)
|
macro_optional_find_package(LibEchonest 1.1.1)
|
||||||
macro_log_feature(LIBECHONEST_FOUND "Echonest" "Qt library for communicating with The Echo Nest" "http://projects.kde.org/libechonest" TRUE "" "libechonest is needed for dynamic playlists and the infosystem")
|
macro_log_feature(LIBECHONEST_FOUND "Echonest" "Qt library for communicating with The Echo Nest" "http://projects.kde.org/libechonest" TRUE "" "libechonest is needed for dynamic playlists and the infosystem")
|
||||||
|
@@ -36,7 +36,7 @@ namespace Tomahawk
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NO_LIBLASTFM
|
#ifdef LIBLASTFM_FOUND
|
||||||
#include <lastfm/NetworkAccessManager>
|
#include <lastfm/NetworkAccessManager>
|
||||||
#include "scrobbler.h"
|
#include "scrobbler.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -99,7 +99,7 @@ private:
|
|||||||
XMPPBot* m_xmppBot;
|
XMPPBot* m_xmppBot;
|
||||||
Tomahawk::ShortcutHandler* m_shortcutHandler;
|
Tomahawk::ShortcutHandler* m_shortcutHandler;
|
||||||
|
|
||||||
#ifndef NO_LIBLASTFM
|
#ifdef LIBLASTFM_FOUND
|
||||||
Scrobbler* m_scrobbler;
|
Scrobbler* m_scrobbler;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -37,7 +37,6 @@ SET( tomahawkSources ${tomahawkSources}
|
|||||||
|
|
||||||
musicscanner.cpp
|
musicscanner.cpp
|
||||||
scriptresolver.cpp
|
scriptresolver.cpp
|
||||||
scrobbler.cpp
|
|
||||||
shortcuthandler.cpp
|
shortcuthandler.cpp
|
||||||
|
|
||||||
scanmanager.cpp
|
scanmanager.cpp
|
||||||
@@ -45,6 +44,12 @@ SET( tomahawkSources ${tomahawkSources}
|
|||||||
main.cpp
|
main.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
IF(LIBLASTFM_FOUND)
|
||||||
|
SET(tomahawkSources ${tomahawkSources}
|
||||||
|
scrobbler.cpp
|
||||||
|
)
|
||||||
|
ENDIF(LIBLASTFM_FOUND)
|
||||||
|
|
||||||
SET( tomahawkSourcesGui ${tomahawkSourcesGui}
|
SET( tomahawkSourcesGui ${tomahawkSourcesGui}
|
||||||
sourcetree/sourcesmodel.cpp
|
sourcetree/sourcesmodel.cpp
|
||||||
sourcetree/sourcetreeitem.cpp
|
sourcetree/sourcetreeitem.cpp
|
||||||
@@ -78,11 +83,16 @@ SET( tomahawkHeaders ${tomahawkHeaders}
|
|||||||
|
|
||||||
musicscanner.h
|
musicscanner.h
|
||||||
scriptresolver.h
|
scriptresolver.h
|
||||||
scrobbler.h
|
|
||||||
scanmanager.h
|
scanmanager.h
|
||||||
shortcuthandler.h
|
shortcuthandler.h
|
||||||
)
|
)
|
||||||
|
|
||||||
|
IF(LIBLASTFM_FOUND)
|
||||||
|
SET(tomahawkHeaders ${tomahawkHeaders}
|
||||||
|
scrobbler.h
|
||||||
|
)
|
||||||
|
ENDIF(LIBLASTFM_FOUND)
|
||||||
|
|
||||||
|
|
||||||
SET( tomahawkHeadersGui ${tomahawkHeadersGui}
|
SET( tomahawkHeadersGui ${tomahawkHeadersGui}
|
||||||
sourcetree/sourcesmodel.h
|
sourcetree/sourcesmodel.h
|
||||||
@@ -178,13 +188,22 @@ ENDIF( WIN32 )
|
|||||||
|
|
||||||
MESSAGE( STATUS "OS_SPECIFIC_LINK_LIBRARIES: ${OS_SPECIFIC_LINK_LIBRARIES}" )
|
MESSAGE( STATUS "OS_SPECIFIC_LINK_LIBRARIES: ${OS_SPECIFIC_LINK_LIBRARIES}" )
|
||||||
|
|
||||||
|
SET(LINK_LIBRARIES "")
|
||||||
|
IF(LIBLASTFM_FOUND)
|
||||||
|
SET(LINK_LIBRARIES
|
||||||
|
${LINK_LIBRARIES}
|
||||||
|
${LIBLASTFM_LIBRARY}
|
||||||
|
)
|
||||||
|
ENDIF(LIBLASTFM_FOUND)
|
||||||
|
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES( tomahawk
|
TARGET_LINK_LIBRARIES( tomahawk
|
||||||
|
${LINK_LIBRARIES}
|
||||||
${TOMAHAWK_LIBRARIES}
|
${TOMAHAWK_LIBRARIES}
|
||||||
${QT_LIBRARIES}
|
${QT_LIBRARIES}
|
||||||
${MAC_EXTRA_LIBS}
|
${MAC_EXTRA_LIBS}
|
||||||
${OS_SPECIFIC_LINK_LIBRARIES}
|
${OS_SPECIFIC_LINK_LIBRARIES}
|
||||||
${LIBECHONEST_LIBRARY}
|
${LIBECHONEST_LIBRARY}
|
||||||
${LIBLASTFM_LIBRARY}
|
|
||||||
${QXTWEB_LIBRARIES}
|
${QXTWEB_LIBRARIES}
|
||||||
${QTWEETLIB_LIBRARIES}
|
${QTWEETLIB_LIBRARIES}
|
||||||
${QJSON_LIBRARIES}
|
${QJSON_LIBRARIES}
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QNetworkProxy>
|
#include <QNetworkProxy>
|
||||||
|
|
||||||
#ifndef NO_LIBLASTFM
|
#ifdef LIBLASTFM_FOUND
|
||||||
#include <lastfm/ws.h>
|
#include <lastfm/ws.h>
|
||||||
#include <lastfm/XmlQuery>
|
#include <lastfm/XmlQuery>
|
||||||
#endif
|
#endif
|
||||||
@@ -196,7 +196,7 @@ SettingsDialog::toggleUpnp( bool preferStaticEnabled )
|
|||||||
void
|
void
|
||||||
SettingsDialog::testLastFmLogin()
|
SettingsDialog::testLastFmLogin()
|
||||||
{
|
{
|
||||||
#ifndef NO_LIBLASTFM
|
#ifdef LIBLASTFM_FOUND
|
||||||
ui->pushButtonTestLastfmLogin->setEnabled( false );
|
ui->pushButtonTestLastfmLogin->setEnabled( false );
|
||||||
ui->pushButtonTestLastfmLogin->setText( "Testing..." );
|
ui->pushButtonTestLastfmLogin->setText( "Testing..." );
|
||||||
|
|
||||||
@@ -217,7 +217,7 @@ SettingsDialog::testLastFmLogin()
|
|||||||
void
|
void
|
||||||
SettingsDialog::onLastFmFinished()
|
SettingsDialog::onLastFmFinished()
|
||||||
{
|
{
|
||||||
#ifndef NO_LIBLASTFM
|
#ifdef LIBLASTFM_FOUND
|
||||||
lastfm::XmlQuery lfm = lastfm::XmlQuery( m_testLastFmQuery->readAll() );
|
lastfm::XmlQuery lfm = lastfm::XmlQuery( m_testLastFmQuery->readAll() );
|
||||||
|
|
||||||
switch( m_testLastFmQuery->error() )
|
switch( m_testLastFmQuery->error() )
|
||||||
|
@@ -7,6 +7,7 @@
|
|||||||
#include <QNetworkReply>
|
#include <QNetworkReply>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
#include <QNetworkProxy>
|
||||||
|
|
||||||
#include "artist.h"
|
#include "artist.h"
|
||||||
#include "album.h"
|
#include "album.h"
|
||||||
@@ -189,7 +190,7 @@ TomahawkApp::TomahawkApp( int& argc, char *argv[] )
|
|||||||
connect( m_shortcutHandler, SIGNAL( mute() ), m_audioEngine, SLOT( mute() ) );
|
connect( m_shortcutHandler, SIGNAL( mute() ), m_audioEngine, SLOT( mute() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NO_LIBLASTFM
|
#ifdef LIBLASTFM_FOUND
|
||||||
qDebug() << "Init Scrobbler.";
|
qDebug() << "Init Scrobbler.";
|
||||||
m_scrobbler = new Scrobbler( this );
|
m_scrobbler = new Scrobbler( this );
|
||||||
qDebug() << "Setting NAM.";
|
qDebug() << "Setting NAM.";
|
||||||
|
Reference in New Issue
Block a user