mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-09 23:57:34 +02:00
Do more clean up in the CMakeLists.txt and depend on CLucene 0.9.23
This commit is contained in:
@@ -20,8 +20,9 @@ check_taglib_filename( COMPLEX_TAGLIB_FILENAME )
|
|||||||
|
|
||||||
FIND_PACKAGE( LibLastFm 0.3.3 REQUIRED )
|
FIND_PACKAGE( LibLastFm 0.3.3 REQUIRED )
|
||||||
FIND_PACKAGE( LibEchonest 1.1.1 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( Gloox 1.0 REQUIRED )
|
||||||
|
FIND_PACKAGE( QJSON REQUIRED )
|
||||||
|
|
||||||
ADD_SUBDIRECTORY( thirdparty )
|
ADD_SUBDIRECTORY( thirdparty )
|
||||||
ADD_SUBDIRECTORY( src/libtomahawk )
|
ADD_SUBDIRECTORY( src/libtomahawk )
|
||||||
|
@@ -14,3 +14,4 @@ set(WINDRES_EXECUTABLE /usr/bin/i686-pc-mingw32-windres)
|
|||||||
|
|
||||||
# libs with broken find modules
|
# libs with broken find modules
|
||||||
set(TAGLIB_FOUND true)
|
set(TAGLIB_FOUND true)
|
||||||
|
set(TAGLIB_LIBRARIES ${CMAKE_FIND_ROOT_PATH}/lib/libtag.dll.a)
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
SET( TOMAHAWK_LIBRARIES tomahawklib )
|
||||||
|
|
||||||
SET( OS_SPECIFIC_LINK_LIBRARIES
|
SET( OS_SPECIFIC_LINK_LIBRARIES
|
||||||
${OS_SPECIFIC_LINK_LIBRARIES}
|
${OS_SPECIFIC_LINK_LIBRARIES}
|
||||||
${COREAUDIO_LIBRARY}
|
${COREAUDIO_LIBRARY}
|
||||||
@@ -10,7 +12,6 @@ SET( OS_SPECIFIC_LINK_LIBRARIES
|
|||||||
/System/Library/Frameworks/IOKit.framework
|
/System/Library/Frameworks/IOKit.framework
|
||||||
|
|
||||||
rtaudio
|
rtaudio
|
||||||
tomahawklib
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
|
@@ -16,7 +16,7 @@ SET( CMAKE_VERBOSE_MAKEFILE ON )
|
|||||||
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
|
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
|
||||||
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
|
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
|
||||||
SET( CMAKE_ARCHIVE_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
|
# build plugins
|
||||||
# use glob, but hardcoded list for now:
|
# use glob, but hardcoded list for now:
|
||||||
@@ -128,12 +128,9 @@ INCLUDE_DIRECTORIES(
|
|||||||
${THIRDPARTY_DIR}/qtweetlib/qtweetlib/src
|
${THIRDPARTY_DIR}/qtweetlib/qtweetlib/src
|
||||||
${THIRDPARTY_DIR}/qtweetlib/tomahawk-custom
|
${THIRDPARTY_DIR}/qtweetlib/tomahawk-custom
|
||||||
|
|
||||||
/usr/include/taglib
|
|
||||||
/usr/local/include/taglib
|
|
||||||
/usr/local/include
|
|
||||||
|
|
||||||
|
${TAGLIB_INCLUDES}
|
||||||
${LIBECHONEST_INCLUDE_DIR}
|
${LIBECHONEST_INCLUDE_DIR}
|
||||||
${LIBECHONEST_INCLUDE_DIR}/..
|
|
||||||
)
|
)
|
||||||
|
|
||||||
SET( OS_SPECIFIC_LINK_LIBRARIES "" )
|
SET( OS_SPECIFIC_LINK_LIBRARIES "" )
|
||||||
@@ -147,7 +144,7 @@ ENDIF( UNIX )
|
|||||||
|
|
||||||
ADD_SUBDIRECTORY( sip )
|
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_add_resources( RC_SRCS "../resources.qrc" )
|
||||||
qt4_wrap_cpp( tomahawkMoc ${tomahawkHeaders} )
|
qt4_wrap_cpp( tomahawkMoc ${tomahawkHeaders} )
|
||||||
|
|
||||||
@@ -178,14 +175,18 @@ ENDIF( WIN32 )
|
|||||||
MESSAGE( STATUS "OS_SPECIFIC_LINK_LIBRARIES: ${OS_SPECIFIC_LINK_LIBRARIES}" )
|
MESSAGE( STATUS "OS_SPECIFIC_LINK_LIBRARIES: ${OS_SPECIFIC_LINK_LIBRARIES}" )
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES( tomahawk
|
TARGET_LINK_LIBRARIES( tomahawk
|
||||||
|
${TOMAHAWK_LIBRARIES}
|
||||||
${QT_LIBRARIES}
|
${QT_LIBRARIES}
|
||||||
${MAC_EXTRA_LIBS}
|
${MAC_EXTRA_LIBS}
|
||||||
${OS_SPECIFIC_LINK_LIBRARIES}
|
${OS_SPECIFIC_LINK_LIBRARIES}
|
||||||
${LIBECHONEST_LIBRARY}
|
${LIBECHONEST_LIBRARY}
|
||||||
|
${LIBLASTFM_LIBRARY}
|
||||||
qjson
|
${GLOOX_LIBRARIES}
|
||||||
tag
|
${QXTWEB_LIBRARIES}
|
||||||
tomahawk_qtweetlib
|
${QTWEETLIB_LIBRARIES}
|
||||||
|
${QJSON_LIBRARIES}
|
||||||
|
${TAGLIB_LIBRARIES}
|
||||||
|
${QTWEETLIB_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
INCLUDE( "CPack.txt" )
|
INCLUDE( "CPack.txt" )
|
||||||
|
@@ -4,19 +4,7 @@ ADD_DEFINITIONS( -g )
|
|||||||
ADD_DEFINITIONS( -fno-operator-names )
|
ADD_DEFINITIONS( -fno-operator-names )
|
||||||
ADD_DEFINITIONS( -fPIC )
|
ADD_DEFINITIONS( -fPIC )
|
||||||
|
|
||||||
SET( OS_SPECIFIC_LINK_LIBRARIES
|
SET( QXTWEB_LIBRARIES qxtweb-standalone )
|
||||||
${LIBLASTFM_LIBRARY}
|
|
||||||
${GLOOX_LIBRARIES}
|
|
||||||
qxtweb-standalone
|
|
||||||
)
|
|
||||||
|
|
||||||
SET( OS_SPECIFIC_LINK_LIBRARIES
|
|
||||||
${OS_SPECIFIC_LINK_LIBRARIES}
|
|
||||||
mad
|
|
||||||
vorbisfile
|
|
||||||
ogg
|
|
||||||
FLAC++
|
|
||||||
)
|
|
||||||
|
|
||||||
IF( APPLE )
|
IF( APPLE )
|
||||||
INCLUDE( "CMakeLists.osx.txt" )
|
INCLUDE( "CMakeLists.osx.txt" )
|
||||||
|
@@ -5,20 +5,15 @@ ADD_DEFINITIONS( /DWIN32_LEAN_AND_MEAN )
|
|||||||
ADD_DEFINITIONS( -static-libgcc )
|
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
|
SET( OS_SPECIFIC_LINK_LIBRARIES
|
||||||
${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
|
# third party shipped with tomahawk
|
||||||
${CMAKE_BINARY_DIR}/thirdparty/qtweetlib/libtomahawk_qtweetlib.dll
|
${CMAKE_BINARY_DIR}/thirdparty/rtaudio/librtaudio.dll
|
||||||
${CMAKE_BINARY_DIR}/rtaudio/librtaudio.dll
|
|
||||||
${CMAKE_BINARY_DIR}/qxt/qxtweb-standalone/libqxtweb-standalone.dll
|
|
||||||
|
|
||||||
# system libs
|
# system libs
|
||||||
"secur32.dll"
|
"secur32.dll"
|
||||||
|
@@ -324,7 +324,7 @@ IF( WIN32 )
|
|||||||
SET( OS_SPECIFIC_LINK_LIBRARIES
|
SET( OS_SPECIFIC_LINK_LIBRARIES
|
||||||
${OS_SPECIFIC_LINK_LIBRARIES}
|
${OS_SPECIFIC_LINK_LIBRARIES}
|
||||||
# Thirdparty
|
# Thirdparty
|
||||||
${CMAKE_BINARY_DIR}/rtaudio/librtaudio.dll
|
${CMAKE_BINARY_DIR}/thirdparty/rtaudio/librtaudio.dll
|
||||||
# System
|
# System
|
||||||
"iphlpapi.a"
|
"iphlpapi.a"
|
||||||
"ws2_32.dll"
|
"ws2_32.dll"
|
||||||
@@ -383,6 +383,7 @@ target_link_libraries( tomahawklib
|
|||||||
mad
|
mad
|
||||||
|
|
||||||
# External deps
|
# External deps
|
||||||
|
${TAGLIB_LIBRARIES}
|
||||||
${QJSON_LIBRARIES}
|
${QJSON_LIBRARIES}
|
||||||
${CLUCENE_LIBRARY}
|
${CLUCENE_LIBRARY}
|
||||||
${LIBECHONEST_LIBRARY}
|
${LIBECHONEST_LIBRARY}
|
||||||
|
@@ -8,14 +8,12 @@
|
|||||||
|
|
||||||
#include <CLucene.h>
|
#include <CLucene.h>
|
||||||
|
|
||||||
#ifndef WIN32
|
|
||||||
using namespace lucene::analysis;
|
using namespace lucene::analysis;
|
||||||
using namespace lucene::document;
|
using namespace lucene::document;
|
||||||
using namespace lucene::store;
|
using namespace lucene::store;
|
||||||
using namespace lucene::index;
|
using namespace lucene::index;
|
||||||
using namespace lucene::queryParser;
|
using namespace lucene::queryParser;
|
||||||
using namespace lucene::search;
|
using namespace lucene::search;
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
FuzzyIndex::FuzzyIndex( DatabaseImpl& db )
|
FuzzyIndex::FuzzyIndex( DatabaseImpl& db )
|
||||||
|
@@ -7,7 +7,6 @@
|
|||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QMutex>
|
#include <QMutex>
|
||||||
|
|
||||||
#ifndef WIN32
|
|
||||||
namespace lucene
|
namespace lucene
|
||||||
{
|
{
|
||||||
namespace analysis
|
namespace analysis
|
||||||
@@ -28,13 +27,6 @@ namespace lucene
|
|||||||
class IndexSearcher;
|
class IndexSearcher;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
class SimpleAnalyzer;
|
|
||||||
class Directory;
|
|
||||||
class IndexReader;
|
|
||||||
class IndexWriter;
|
|
||||||
class IndexSearcher;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class DatabaseImpl;
|
class DatabaseImpl;
|
||||||
|
|
||||||
@@ -62,17 +54,10 @@ private:
|
|||||||
DatabaseImpl& m_db;
|
DatabaseImpl& m_db;
|
||||||
QMutex m_mutex;
|
QMutex m_mutex;
|
||||||
|
|
||||||
#ifndef WIN32
|
|
||||||
lucene::analysis::SimpleAnalyzer* m_analyzer;
|
lucene::analysis::SimpleAnalyzer* m_analyzer;
|
||||||
lucene::store::Directory* m_luceneDir;
|
lucene::store::Directory* m_luceneDir;
|
||||||
lucene::index::IndexReader* m_luceneReader;
|
lucene::index::IndexReader* m_luceneReader;
|
||||||
lucene::search::IndexSearcher* m_luceneSearcher;
|
lucene::search::IndexSearcher* m_luceneSearcher;
|
||||||
#else
|
|
||||||
SimpleAnalyzer* m_analyzer;
|
|
||||||
Directory* m_luceneDir;
|
|
||||||
IndexReader* m_luceneReader;
|
|
||||||
IndexSearcher* m_luceneSearcher;
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // FUZZYINDEX_H
|
#endif // FUZZYINDEX_H
|
||||||
|
Reference in New Issue
Block a user