diff --git a/CMakeLists.txt b/CMakeLists.txt index 16e90cb2b..72f1628fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 ) diff --git a/admin/win/Toolchain-mingw32-openSUSE.cmake b/admin/win/Toolchain-mingw32-openSUSE.cmake index 808be23e4..5e62dc2e5 100644 --- a/admin/win/Toolchain-mingw32-openSUSE.cmake +++ b/admin/win/Toolchain-mingw32-openSUSE.cmake @@ -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) diff --git a/src/CMakeLists.osx.txt b/src/CMakeLists.osx.txt index 256e34746..ae2098012 100644 --- a/src/CMakeLists.osx.txt +++ b/src/CMakeLists.osx.txt @@ -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) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 71a9f1eaa..5e10e097d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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" ) diff --git a/src/CMakeLists.unix.txt b/src/CMakeLists.unix.txt index d28e33558..cce2e5cd5 100644 --- a/src/CMakeLists.unix.txt +++ b/src/CMakeLists.unix.txt @@ -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" ) diff --git a/src/CMakeLists.win32.txt b/src/CMakeLists.win32.txt index 84145d4be..222f0bee5 100644 --- a/src/CMakeLists.win32.txt +++ b/src/CMakeLists.win32.txt @@ -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" diff --git a/src/libtomahawk/CMakeLists.txt b/src/libtomahawk/CMakeLists.txt index be78124bc..f085c1f26 100644 --- a/src/libtomahawk/CMakeLists.txt +++ b/src/libtomahawk/CMakeLists.txt @@ -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} diff --git a/src/libtomahawk/database/fuzzyindex.cpp b/src/libtomahawk/database/fuzzyindex.cpp index 848536e83..1aae63130 100644 --- a/src/libtomahawk/database/fuzzyindex.cpp +++ b/src/libtomahawk/database/fuzzyindex.cpp @@ -8,14 +8,12 @@ #include -#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 ) diff --git a/src/libtomahawk/database/fuzzyindex.h b/src/libtomahawk/database/fuzzyindex.h index 036907ba7..e3274149b 100644 --- a/src/libtomahawk/database/fuzzyindex.h +++ b/src/libtomahawk/database/fuzzyindex.h @@ -7,7 +7,6 @@ #include #include -#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