[Amarok] 621cefa: Build without LastFM improvements

Rick W. Chen stuffcorpse at archlinux.us
Tue Jun 1 08:27:28 CEST 2010


On 31 May 2010 16:46 +0200, rengels:
> ext Dan Meltzer wrote:
> > On Sat, May 29, 2010 at 1:02 PM, Casey Link <unnamedrambler at gmail.com> wrote:
> >   
> >> Hey Ralf,
> >>
> >> This commit looks a little wonky.. shouldn't WITH_LibLastFm  be
> >> declared (or w/e the cmake term is)  with option( WITH_LibLastFm  ....
> >> ) at the top of CMakeLists.txt like the other WITH_*?
> >>
> >> Casey
> >>     
> >
> > Also, isn't it macro_optional_find_package that adds this WITH_ variable?
> >   
> 
> I have to admit that I don't completely understand how the 
> WITH_LibLastFm variable is defined.
> I just noticed that I still got build problems when building without 
> LibLastFm and I changed it to the way it looks at all the other places.
> 
> I can assure you that this change fixes the build without LibLastFm.
> If you rebuild it at your machine with LibLastFm and everything is still 
> ok, then I guess everything is all right.
> 
> BR,
> Ralf

Now similar artists and upcoming events applets won't be built even if
liblastfm is installed. The macro_optional_find_package() should be
moved outside the if statement else the variables don't get set.

> >> On Sat, May 29, 2010 at 7:48 AM, Ralf Engels <ralf.engels at nokia.com> wrote:
> >>     
> >>> commit 621cefa33d800c494c428e71be4555deb070d27a
> >>> Author: Ralf Engels <ralf.engels at nokia.com>
> >>> Date:   Sun Apr 4 20:12:18 2010 +0200
> >>>
> >>>    Build without LastFM improvements
> >>>
> >>> diff --git a/CMakeLists.txt b/CMakeLists.txt
> >>> index 098e6ad..e380fbb 100644
> >>> --- a/CMakeLists.txt
> >>> +++ b/CMakeLists.txt
> >>> @@ -105,9 +105,11 @@ if( WITH_PLAYER )
> >>>     macro_optional_find_package(Strigi)
> >>>     macro_log_feature( STRIGI_FOUND "strigi" "Index metadata of files" "http://strigi.sourceforge.net" TRUE "" "" )
> >>>
> >>> -    macro_optional_find_package(LibLastFm)
> >>> -    macro_log_feature( LIBLASTFM_FOUND "liblastfm" "Enable Last.Fm service, including scrobbling, song submissions, and suggested song dynamic playlists" "http://cdn.last.fm/src/liblastfm-0.3.0.tar.bz2" FALSE "0.3" "" )
> >>> -    macro_bool_to_01( LIBLASTFM_FOUND HAVE_LIBLASTFM )
> >>> +    if( WITH_LibLastFm )
> >>> +        macro_optional_find_package(LibLastFm)
> >>> +        macro_log_feature( LIBLASTFM_FOUND "liblastfm" "Enable Last.Fm service, including scrobbling, song submissions, and suggested song dynamic playlists" "http://cdn.last.fm/src/liblastfm-0.3.0.tar.bz2" FALSE "0.3" "" )
> >>> +        macro_bool_to_01( LIBLASTFM_FOUND HAVE_LIBLASTFM )
> >>> +    endif( WITH_LibLastFm )
> >>>
> >>>
> >>>     if( WITH_IPOD )
> >>> diff --git a/tests/context/engines/CMakeLists.txt b/tests/context/engines/CMakeLists.txt
> >>> index fd93c63..9a7d8db 100644
> >>> --- a/tests/context/engines/CMakeLists.txt
> >>> +++ b/tests/context/engines/CMakeLists.txt
> >>> @@ -8,5 +8,7 @@ include_directories(
> >>>   ${QT_INCLUDES}
> >>>  )
> >>>
> >>> -add_subdirectory( upcomingevents )
> >>> -add_subdirectory( similarartists )
> >>> \ No newline at end of file
> >>> +if(LIBLASTFM_FOUND)
> >>> +    add_subdirectory( similarartists )
> >>> +    add_subdirectory( upcomingevents )
> >>> +endif(LIBLASTFM_FOUND)

-- 
    Rick


More information about the Amarok-devel mailing list