diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 526ca2cac..2ad203283 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -92,7 +92,6 @@ set(SOURCES covers/coverprovider.cpp covers/coverproviders.cpp covers/kittenloader.cpp - covers/lastfmcoverprovider.cpp devices/connecteddevice.cpp devices/devicedatabasebackend.cpp @@ -297,7 +296,6 @@ set(HEADERS covers/coverprovider.h covers/coverproviders.h covers/kittenloader.h - covers/lastfmcoverprovider.h devices/connecteddevice.h devices/devicedatabasebackend.h @@ -557,6 +555,7 @@ endif(ENABLE_VISUALISATIONS) # Lastfm if(HAVE_LIBLASTFM) list(APPEND SOURCES + covers/lastfmcoverprovider.cpp radio/fixlastfm.cpp radio/lastfmconfig.cpp radio/lastfmservice.cpp @@ -570,6 +569,7 @@ if(HAVE_LIBLASTFM) ui/albumcoversearcher.cpp ) list(APPEND HEADERS + covers/lastfmcoverprovider.h radio/lastfmconfig.h radio/lastfmservice.h radio/lastfmstationdialog.h diff --git a/src/covers/coverproviders.cpp b/src/covers/coverproviders.cpp index d449bcc8f..6effbad8e 100644 --- a/src/covers/coverproviders.cpp +++ b/src/covers/coverproviders.cpp @@ -17,7 +17,10 @@ #include "coverprovider.h" #include "coverproviders.h" -#include "lastfmcoverprovider.h" + +#ifdef HAVE_LIBLASTFM +# include "lastfmcoverprovider.h" +#endif CoverProviders::CoverProviders() { @@ -26,7 +29,9 @@ CoverProviders::CoverProviders() // every built-in provider needs an explicit parent; otherwise, // the default parent, namely CoverProviders::instance(), will // cause an infinite recursion here - cover_providers_.append(new LastFmCoverProvider(this)); +#ifdef HAVE_LIBLASTFM + cover_providers_.append(new LastFmCoverProvider(this)); +#endif } void CoverProviders::AddCoverProvider(CoverProvider* provider) { diff --git a/src/ui/albumcoverchoicecontroller.h b/src/ui/albumcoverchoicecontroller.h index 7e3824bfb..438baa1d4 100644 --- a/src/ui/albumcoverchoicecontroller.h +++ b/src/ui/albumcoverchoicecontroller.h @@ -24,10 +24,10 @@ #include #ifdef HAVE_LIBLASTFM - class AlbumCoverFetcher; class AlbumCoverSearcher; #endif +class AlbumCoverFetcher; class CoverFromURLDialog; class LibraryBackend; class QFileDialog; @@ -117,8 +117,8 @@ private: #ifdef HAVE_LIBLASTFM AlbumCoverSearcher* cover_searcher_; - AlbumCoverFetcher* cover_fetcher_; #endif + AlbumCoverFetcher* cover_fetcher_; QFileDialog* save_file_dialog_; CoverFromURLDialog* cover_from_url_dialog_;