1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-20 16:02:07 +02:00

Do more clean up in the CMakeLists.txt and depend on CLucene 0.9.23

This commit is contained in:
Dominik Schmidt 2011-02-21 15:23:38 +01:00
parent 06c168f321
commit 45756891b4
9 changed files with 24 additions and 53 deletions

View File

@ -20,8 +20,9 @@ check_taglib_filename( COMPLEX_TAGLIB_FILENAME )
FIND_PACKAGE( LibLastFm 0.3.3 REQUIRED )
FIND_PACKAGE( LibEchonest 1.1.1 REQUIRED )
FIND_PACKAGE( CLucene REQUIRED )
FIND_PACKAGE( CLucene 0.9.23 REQUIRED )
FIND_PACKAGE( Gloox 1.0 REQUIRED )
FIND_PACKAGE( QJSON REQUIRED )
ADD_SUBDIRECTORY( thirdparty )
ADD_SUBDIRECTORY( src/libtomahawk )

View File

@ -14,3 +14,4 @@ set(WINDRES_EXECUTABLE /usr/bin/i686-pc-mingw32-windres)
# libs with broken find modules
set(TAGLIB_FOUND true)
set(TAGLIB_LIBRARIES ${CMAKE_FIND_ROOT_PATH}/lib/libtag.dll.a)

View File

@ -1,3 +1,5 @@
SET( TOMAHAWK_LIBRARIES tomahawklib )
SET( OS_SPECIFIC_LINK_LIBRARIES
${OS_SPECIFIC_LINK_LIBRARIES}
${COREAUDIO_LIBRARY}
@ -10,7 +12,6 @@ SET( OS_SPECIFIC_LINK_LIBRARIES
/System/Library/Frameworks/IOKit.framework
rtaudio
tomahawklib
)
if (APPLE)

View File

@ -16,7 +16,7 @@ SET( CMAKE_VERBOSE_MAKEFILE ON )
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
SET( TOMAHAWK_INC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../include/" )
SET( TOMAHAWK_INC_DIR "${CMAKE_SOURCE_DIR}/include/" )
# build plugins
# use glob, but hardcoded list for now:
@ -128,12 +128,9 @@ INCLUDE_DIRECTORIES(
${THIRDPARTY_DIR}/qtweetlib/qtweetlib/src
${THIRDPARTY_DIR}/qtweetlib/tomahawk-custom
/usr/include/taglib
/usr/local/include/taglib
/usr/local/include
${TAGLIB_INCLUDES}
${LIBECHONEST_INCLUDE_DIR}
${LIBECHONEST_INCLUDE_DIR}/..
)
SET( OS_SPECIFIC_LINK_LIBRARIES "" )
@ -147,7 +144,7 @@ ENDIF( UNIX )
ADD_SUBDIRECTORY( sip )
kde4_add_app_icon( tomahawkSources "${CMAKE_CURRENT_SOURCE_DIR}/../data/icons/tomahawk-icon-*.png" )
kde4_add_app_icon( tomahawkSources "${CMAKE_SOURCE_DIR}/data/icons/tomahawk-icon-*.png" )
qt4_add_resources( RC_SRCS "../resources.qrc" )
qt4_wrap_cpp( tomahawkMoc ${tomahawkHeaders} )
@ -178,14 +175,18 @@ ENDIF( WIN32 )
MESSAGE( STATUS "OS_SPECIFIC_LINK_LIBRARIES: ${OS_SPECIFIC_LINK_LIBRARIES}" )
TARGET_LINK_LIBRARIES( tomahawk
${TOMAHAWK_LIBRARIES}
${QT_LIBRARIES}
${MAC_EXTRA_LIBS}
${OS_SPECIFIC_LINK_LIBRARIES}
${LIBECHONEST_LIBRARY}
qjson
tag
tomahawk_qtweetlib
${LIBLASTFM_LIBRARY}
${GLOOX_LIBRARIES}
${QXTWEB_LIBRARIES}
${QTWEETLIB_LIBRARIES}
${QJSON_LIBRARIES}
${TAGLIB_LIBRARIES}
${QTWEETLIB_LIBRARIES}
)
INCLUDE( "CPack.txt" )

View File

@ -4,19 +4,7 @@ ADD_DEFINITIONS( -g )
ADD_DEFINITIONS( -fno-operator-names )
ADD_DEFINITIONS( -fPIC )
SET( OS_SPECIFIC_LINK_LIBRARIES
${LIBLASTFM_LIBRARY}
${GLOOX_LIBRARIES}
qxtweb-standalone
)
SET( OS_SPECIFIC_LINK_LIBRARIES
${OS_SPECIFIC_LINK_LIBRARIES}
mad
vorbisfile
ogg
FLAC++
)
SET( QXTWEB_LIBRARIES qxtweb-standalone )
IF( APPLE )
INCLUDE( "CMakeLists.osx.txt" )

View File

@ -5,20 +5,15 @@ ADD_DEFINITIONS( /DWIN32_LEAN_AND_MEAN )
ADD_DEFINITIONS( -static-libgcc )
SET( TOMAHAWK_LIBRARIES ${CMAKE_BINARY_DIR}/src/libtomahawk/libtomahawklib.dll )
SET( QTWEETLIB_LIBRARIES ${CMAKE_BINARY_DIR}/thirdparty/qtweetlib/libtomahawk_qtweetlib.dll )
SET( QXTWEB_LIBRARIES ${CMAKE_BINARY_DIR}/thirdparty/qxt/qxtweb-standalone/libqxtweb-standalone.dll )
SET( OS_SPECIFIC_LINK_LIBRARIES
${OS_SPECIFIC_LINK_LIBRARIES}
#internal deps
${CMAKE_BINARY_DIR}/src/libtomahawk/libtomahawklib.dll
# normal deps
${LIBLASTFM_LIBRARY}
${GLOOX_LIBRARIES}
# third party shipped with tomahawk
${CMAKE_BINARY_DIR}/thirdparty/qtweetlib/libtomahawk_qtweetlib.dll
${CMAKE_BINARY_DIR}/rtaudio/librtaudio.dll
${CMAKE_BINARY_DIR}/qxt/qxtweb-standalone/libqxtweb-standalone.dll
${CMAKE_BINARY_DIR}/thirdparty/rtaudio/librtaudio.dll
# system libs
"secur32.dll"

View File

@ -324,7 +324,7 @@ IF( WIN32 )
SET( OS_SPECIFIC_LINK_LIBRARIES
${OS_SPECIFIC_LINK_LIBRARIES}
# Thirdparty
${CMAKE_BINARY_DIR}/rtaudio/librtaudio.dll
${CMAKE_BINARY_DIR}/thirdparty/rtaudio/librtaudio.dll
# System
"iphlpapi.a"
"ws2_32.dll"
@ -383,6 +383,7 @@ target_link_libraries( tomahawklib
mad
# External deps
${TAGLIB_LIBRARIES}
${QJSON_LIBRARIES}
${CLUCENE_LIBRARY}
${LIBECHONEST_LIBRARY}

View File

@ -8,14 +8,12 @@
#include <CLucene.h>
#ifndef WIN32
using namespace lucene::analysis;
using namespace lucene::document;
using namespace lucene::store;
using namespace lucene::index;
using namespace lucene::queryParser;
using namespace lucene::search;
#endif
FuzzyIndex::FuzzyIndex( DatabaseImpl& db )

View File

@ -7,7 +7,6 @@
#include <QString>
#include <QMutex>
#ifndef WIN32
namespace lucene
{
namespace analysis
@ -28,13 +27,6 @@ namespace lucene
class IndexSearcher;
}
}
#else
class SimpleAnalyzer;
class Directory;
class IndexReader;
class IndexWriter;
class IndexSearcher;
#endif
class DatabaseImpl;
@ -62,17 +54,10 @@ private:
DatabaseImpl& m_db;
QMutex m_mutex;
#ifndef WIN32
lucene::analysis::SimpleAnalyzer* m_analyzer;
lucene::store::Directory* m_luceneDir;
lucene::index::IndexReader* m_luceneReader;
lucene::search::IndexSearcher* m_luceneSearcher;
#else
SimpleAnalyzer* m_analyzer;
Directory* m_luceneDir;
IndexReader* m_luceneReader;
IndexSearcher* m_luceneSearcher;
#endif
};
#endif // FUZZYINDEX_H