From 705b5c9e47cabf344fff20e7d54934b921415d09 Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Tue, 15 Jan 2013 00:59:28 +0100 Subject: [PATCH] Clean up CMake for optional liblastfm --- src/libtomahawk/CMakeLists.txt | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/libtomahawk/CMakeLists.txt b/src/libtomahawk/CMakeLists.txt index aa1d69ca7..b37f972bc 100644 --- a/src/libtomahawk/CMakeLists.txt +++ b/src/libtomahawk/CMakeLists.txt @@ -318,10 +318,12 @@ list(APPEND libSources ) IF(LIBLASTFM_FOUND) - set( libSources ${libSources} - accounts/lastfm/LastFmAccount.cpp - accounts/lastfm/LastFmConfig.cpp - accounts/lastfm/LastFmInfoPlugin.cpp + include_directories( ${LIBLASTFM_INCLUDE_DIRS} ) + list(APPEND LINK_LIBRARIES ${LIBLASTFM_LIBRARIES} ) + list(APPEND libSources + accounts/lastfm/LastFmAccount.cpp + accounts/lastfm/LastFmConfig.cpp + accounts/lastfm/LastFmInfoPlugin.cpp ) ENDIF(LIBLASTFM_FOUND) @@ -353,7 +355,6 @@ include_directories( ${QT_INCLUDE_DIR} ${QJSON_INCLUDE_DIR} ${ECHONEST_INCLUDE_DIR} - ${LIBLASTFM_INCLUDE_DIRS} ${CLUCENE_INCLUDE_DIRS} ${PHONON_INCLUDES} @@ -419,10 +420,6 @@ ELSE( APPLE ) SET( libGuiSources ${libGuiSources} thirdparty/Qocoa/qbutton.cpp thirdparty/Qocoa/qsearchfield.cpp thirdparty/Qocoa/qtoolbartabdialog.cpp ) ENDIF( APPLE ) -IF(LIBLASTFM_FOUND) - LIST(APPEND LINK_LIBRARIES ${LIBLASTFM_LIBRARIES} ) -ENDIF(LIBLASTFM_FOUND) - IF(BUILD_GUI) LIST(APPEND libSources ${libGuiSources} ) ENDIF()