Fix liblastfm detection. Protip: variables can't be used before they're set.

This commit is contained in:
David Sansome 2010-12-19 15:10:26 +00:00
parent 2d8028d89a
commit a97c23d173
2 changed files with 8 additions and 7 deletions

View File

@ -56,10 +56,6 @@ endif (WIN32)
find_library(LASTFM_LIBRARIES lastfm)
find_path(LASTFM_INCLUDE_DIRS lastfm/ws.h)
if (ENABLE_LIBLASTFM AND LASTFM_LIBRARIES AND LASTFM_INCLUDE_DIRS)
set(HAVE_LIBLASTFM ON)
endif (ENABLE_LIBLASTFM AND LASTFM_LIBRARIES AND LASTFM_INCLUDE_DIRS)
if (APPLE)
find_library(GROWL Growl)
option(ENABLE_SPARKLE "Sparkle updating" ON)
@ -106,9 +102,6 @@ include_directories(${GSTREAMER_INCLUDE_DIRS})
include_directories(${GLIB_INCLUDE_DIRS})
include_directories(${GLIBCONFIG_INCLUDE_DIRS})
include_directories(${LIBXML_INCLUDE_DIRS})
if (HAVE_LIBLASTFM)
include_directories(${LASTFM_INCLUDE_DIRS})
endif (HAVE_LIBLASTFM)
include_directories("3rdparty/universalchardet")
# Remove GLU and GL from the link line - they're not really required
@ -164,6 +157,10 @@ if(ENABLE_SOUNDMENU AND INDICATEQT_FOUND)
set(HAVE_LIBINDICATE ON)
endif(ENABLE_SOUNDMENU AND INDICATEQT_FOUND)
if(ENABLE_LIBLASTFM AND LASTFM_LIBRARIES AND LASTFM_INCLUDE_DIRS)
set(HAVE_LIBLASTFM ON)
endif(ENABLE_LIBLASTFM AND LASTFM_LIBRARIES AND LASTFM_INCLUDE_DIRS)
if(ENABLE_VISUALISATIONS)
# When/if upstream accepts our patches then these options can be used to link
# to system installed projectM instead.

View File

@ -23,6 +23,10 @@ if(HAVE_LIBINDICATE)
include_directories(${INDICATEQT_INCLUDE_DIRS})
endif(HAVE_LIBINDICATE)
if(HAVE_LIBLASTFM)
include_directories(${LASTFM_INCLUDE_DIRS})
endif(HAVE_LIBLASTFM)
cmake_policy(SET CMP0011 NEW)
include(../cmake/AddEngine.cmake)
include(../cmake/ParseArguments.cmake)