1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-06 14:16:32 +02:00

* Don't compile lastfm parts if liblastfm wasn't found.

This commit is contained in:
Lucas Lira Gomes
2012-07-09 16:49:34 -03:00
committed by Dominik Schmidt
parent 0278f82c2a
commit 420720ae52
2 changed files with 10 additions and 4 deletions

View File

@@ -640,8 +640,10 @@ TomahawkApp::spotifyApiCheckFinished()
void void
TomahawkApp::accountManagerReady() TomahawkApp::accountManagerReady()
{ {
#ifdef LIBLASTFM_FOUND
Tomahawk::Accounts::LastFmAccountFactory* lastfmFactory = new Tomahawk::Accounts::LastFmAccountFactory(); Tomahawk::Accounts::LastFmAccountFactory* lastfmFactory = new Tomahawk::Accounts::LastFmAccountFactory();
m_accountManager.data()->addAccountFactory( lastfmFactory ); m_accountManager.data()->addAccountFactory( lastfmFactory );
#endif
Tomahawk::Accounts::SpotifyAccountFactory* spotifyFactory = new Tomahawk::Accounts::SpotifyAccountFactory; Tomahawk::Accounts::SpotifyAccountFactory* spotifyFactory = new Tomahawk::Accounts::SpotifyAccountFactory;
m_accountManager.data()->addAccountFactory( spotifyFactory ); m_accountManager.data()->addAccountFactory( spotifyFactory );

View File

@@ -207,10 +207,6 @@ list(APPEND libSources
accounts/spotify/SpotifyPlaylistUpdater.cpp accounts/spotify/SpotifyPlaylistUpdater.cpp
accounts/spotify/SpotifyInfoPlugin.cpp accounts/spotify/SpotifyInfoPlugin.cpp
accounts/lastfm/LastFmAccount.cpp
accounts/lastfm/LastFmConfig.cpp
accounts/lastfm/LastFmInfoPlugin.cpp
sip/SipPlugin.cpp sip/SipPlugin.cpp
sip/SipInfo.cpp sip/SipInfo.cpp
sip/PeerInfo.cpp sip/PeerInfo.cpp
@@ -321,6 +317,14 @@ list(APPEND libSources
thirdparty/kdsingleapplicationguard/kdlockedsharedmemorypointer.cpp thirdparty/kdsingleapplicationguard/kdlockedsharedmemorypointer.cpp
) )
IF(LIBLASTFM_FOUND)
set( libSources ${libSources}
accounts/lastfm/LastFmAccount.cpp
accounts/lastfm/LastFmConfig.cpp
accounts/lastfm/LastFmInfoPlugin.cpp
)
ENDIF(LIBLASTFM_FOUND)
set( libUI ${libUI} set( libUI ${libUI}
widgets/PlaylistTypeSelectorDialog.ui widgets/PlaylistTypeSelectorDialog.ui
widgets/NewPlaylistWidget.ui widgets/NewPlaylistWidget.ui