mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 03:10:12 +02:00
Make siptwitter optional and rely on system qtweetlib on default
This commit is contained in:
@@ -77,7 +77,21 @@ IF( INTERNAL_JREEN )
|
|||||||
ELSE( INTERNAL_JREEN )
|
ELSE( INTERNAL_JREEN )
|
||||||
macro_optional_find_package(Jreen)
|
macro_optional_find_package(Jreen)
|
||||||
ENDIF( INTERNAL_JREEN )
|
ENDIF( INTERNAL_JREEN )
|
||||||
macro_log_feature(LIBJREEN_FOUND "Jreen" "Qt XMPP Library" "http://gitorious.org/jreen/jreen" FALSE "" "Jreen is needed for the Jabber SIP plugin. \n\n Use -DINTERNAL_JREEN=ON to build the git submodule inside Tomahawk \n Be aware this installs a full jreen with headers and everything!")
|
macro_log_feature(LIBJREEN_FOUND "Jreen" "Qt XMPP Library" "http://gitorious.org/jreen/jreen" FALSE "" "Jreen is needed for the Jabber SIP plugin. \n\n Use -DINTERNAL_JREEN=ON to build the git submodule inside Tomahawk \n Be aware this installs a full jreen with headers and everything!\n")
|
||||||
|
|
||||||
|
# this installs headers and such and should really be handled in a separate package by packagers
|
||||||
|
IF( INTERNAL_QTWEETLIB )
|
||||||
|
ADD_SUBDIRECTORY( thirdparty/qtweetlib )
|
||||||
|
SET( QTWEETLIB_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/thirdparty/qtweetlib/QTweetLib/src )
|
||||||
|
SET( QTWEETLIB_LIBRARY tomahawk_qtweetlib )
|
||||||
|
SET( QTWEETLIB_LIBRARIES ${QTWEETLIB_LIBRARY} )
|
||||||
|
SET( QTWEETLIB_FOUND true )
|
||||||
|
MESSAGE(STATUS "INTERNAL libQTweetLib: ${QTWEETLIB_INCLUDE_DIR}, ${QTWEETLIB_LIBRARY}")
|
||||||
|
ELSE( INTERNAL_QTWEETLIB )
|
||||||
|
macro_optional_find_package(QTweetLib)
|
||||||
|
ENDIF( INTERNAL_QTWEETLIB )
|
||||||
|
macro_log_feature(QTWEETLIB_FOUND "QTweetLib" "Qt Twitter Library" "https://github.com/minimoog/QTweetLib" FALSE "" "QTweetLib is needed for the Twitter SIP plugin. \n\n Use -DINTERNAL_QTWEETLIB=ON to build the git submodule inside Tomahawk \n")
|
||||||
|
|
||||||
|
|
||||||
# we need pthreads too
|
# we need pthreads too
|
||||||
find_package(Threads)
|
find_package(Threads)
|
||||||
|
31
CMakeModules/FindQTweetLib.cmake
Normal file
31
CMakeModules/FindQTweetLib.cmake
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
# - Try to find QTweetLib
|
||||||
|
#
|
||||||
|
# QTWEETLIB_FOUND - system has QTweetLib
|
||||||
|
# QTWEETLIB_INCLUDE_DIRS - the QTweetLib include directories
|
||||||
|
# QTWEETLIB_LIBRARIES - link these to use QTweetLib
|
||||||
|
#
|
||||||
|
# (c) Dominik Schmidt <dev@dominik-schmidt.de>
|
||||||
|
#
|
||||||
|
|
||||||
|
# Dependencies
|
||||||
|
find_package(Qt4 REQUIRED)
|
||||||
|
|
||||||
|
# Include dir
|
||||||
|
find_path(QTWEETLIB_INCLUDE_DIR
|
||||||
|
NAMES QTweetLib/qtweetlib_global.h
|
||||||
|
PATHS ${KDE4_INCLUDE_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
# Finally the library itself
|
||||||
|
find_library(QTWEETLIB_LIBRARY
|
||||||
|
NAMES QTweetLib
|
||||||
|
PATHS ${KDE4_LIB_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
SET( QTWEETLIB_LIBRARIES ${QTWEETLIB_LIBRARY} ${QJSON_LIBRARIES} )
|
||||||
|
|
||||||
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(QTweetLib DEFAULT_MSG QTWEETLIB_LIBRARY QTWEETLIB_INCLUDE_DIR)
|
||||||
|
|
||||||
|
MARK_AS_ADVANCED(QTWEETLIB_LIBRARIES QTWEETLIB_INCLUDE_DIR)
|
||||||
|
|
@@ -225,10 +225,8 @@ TARGET_LINK_LIBRARIES( tomahawk
|
|||||||
${MAC_EXTRA_LIBS}
|
${MAC_EXTRA_LIBS}
|
||||||
${LIBECHONEST_LIBRARY}
|
${LIBECHONEST_LIBRARY}
|
||||||
${QXTWEB_LIBRARIES}
|
${QXTWEB_LIBRARIES}
|
||||||
${QTWEETLIB_LIBRARIES}
|
|
||||||
${QJSON_LIBRARIES}
|
${QJSON_LIBRARIES}
|
||||||
${TAGLIB_LIBRARIES}
|
${TAGLIB_LIBRARIES}
|
||||||
${QTWEETLIB_LIBRARIES}
|
|
||||||
${CLUCENE_LIBRARIES}
|
${CLUCENE_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -6,7 +6,6 @@ ADD_DEFINITIONS( -static-libgcc )
|
|||||||
|
|
||||||
|
|
||||||
SET( TOMAHAWK_LIBRARIES ${CMAKE_BINARY_DIR}/src/libtomahawk/libtomahawklib.dll )
|
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( QXTWEB_LIBRARIES ${CMAKE_BINARY_DIR}/thirdparty/qxt/qxtweb-standalone/libqxtweb-standalone.dll )
|
||||||
|
|
||||||
SET( OS_SPECIFIC_LINK_LIBRARIES
|
SET( OS_SPECIFIC_LINK_LIBRARIES
|
||||||
|
@@ -362,7 +362,6 @@ include_directories( . ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/.
|
|||||||
${THIRDPARTY_DIR}/jdns
|
${THIRDPARTY_DIR}/jdns
|
||||||
${THIRDPARTY_DIR}/jdns/jdns
|
${THIRDPARTY_DIR}/jdns/jdns
|
||||||
${THIRDPARTY_DIR}/jdns/jdnsshared
|
${THIRDPARTY_DIR}/jdns/jdnsshared
|
||||||
${THIRDPARTY_DIR}/qtweetlib/qtweetlib/src
|
|
||||||
${CMAKE_BINARY_DIR}/thirdparty/liblastfm2/src
|
${CMAKE_BINARY_DIR}/thirdparty/liblastfm2/src
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -419,12 +418,12 @@ add_library( tomahawklib SHARED ${libSources} ${libMoc} )
|
|||||||
target_link_libraries( tomahawklib
|
target_link_libraries( tomahawklib
|
||||||
# Internal
|
# Internal
|
||||||
tomahawk_jdns
|
tomahawk_jdns
|
||||||
tomahawk_qtweetlib
|
|
||||||
|
|
||||||
# Thirdparty shipped with tomahawk
|
# Thirdparty shipped with tomahawk
|
||||||
portfwd
|
portfwd
|
||||||
|
|
||||||
# External deps
|
# External deps
|
||||||
|
${QJSON_LIBRARIES}
|
||||||
${PHONON_LIBS}
|
${PHONON_LIBS}
|
||||||
${TAGLIB_LIBRARIES}
|
${TAGLIB_LIBRARIES}
|
||||||
${CLUCENE_LIBRARIES}
|
${CLUCENE_LIBRARIES}
|
||||||
|
@@ -2,5 +2,8 @@ IF( LIBJREEN_FOUND )
|
|||||||
ADD_SUBDIRECTORY( jabber )
|
ADD_SUBDIRECTORY( jabber )
|
||||||
ENDIF( LIBJREEN_FOUND )
|
ENDIF( LIBJREEN_FOUND )
|
||||||
|
|
||||||
ADD_SUBDIRECTORY( twitter )
|
IF( QTWEETLIB_FOUND )
|
||||||
|
ADD_SUBDIRECTORY( twitter )
|
||||||
|
ENDIF( QTWEETLIB_FOUND )
|
||||||
|
|
||||||
ADD_SUBDIRECTORY( zeroconf )
|
ADD_SUBDIRECTORY( zeroconf )
|
||||||
|
@@ -9,11 +9,13 @@ add_definitions( -DSIPDLLEXPORT_PRO )
|
|||||||
set( twitterSources
|
set( twitterSources
|
||||||
twitter.cpp
|
twitter.cpp
|
||||||
twitterconfigwidget.cpp
|
twitterconfigwidget.cpp
|
||||||
|
tomahawkoauthtwitter.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set( twitterHeaders
|
set( twitterHeaders
|
||||||
twitter.h
|
twitter.h
|
||||||
twitterconfigwidget.h
|
twitterconfigwidget.h
|
||||||
|
tomahawkoauthtwitter.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set( twitterUI
|
set( twitterUI
|
||||||
@@ -22,8 +24,7 @@ set( twitterUI
|
|||||||
|
|
||||||
include_directories( . ${CMAKE_CURRENT_BINARY_DIR} ..
|
include_directories( . ${CMAKE_CURRENT_BINARY_DIR} ..
|
||||||
${QT_INCLUDE_DIR}
|
${QT_INCLUDE_DIR}
|
||||||
${CMAKE_SOURCE_DIR}/thirdparty/qtweetlib/QTweetLib/src
|
${QTWEETLIB_INCLUDE_DIR}
|
||||||
${CMAKE_SOURCE_DIR}/thirdparty/qtweetlib/tomahawk-custom
|
|
||||||
)
|
)
|
||||||
|
|
||||||
qt4_add_resources( RC_SRCS "resources.qrc" )
|
qt4_add_resources( RC_SRCS "resources.qrc" )
|
||||||
@@ -36,15 +37,14 @@ SET( OS_SPECIFIC_LINK_LIBRARIES
|
|||||||
${OS_SPECIFIC_LINK_LIBRARIES}
|
${OS_SPECIFIC_LINK_LIBRARIES}
|
||||||
"winmm.dll"
|
"winmm.dll"
|
||||||
"iphlpapi.a"
|
"iphlpapi.a"
|
||||||
"${CMAKE_BINARY_DIR}/thirdparty/qtweetlib/libtomahawk_qtweetlib.dll"
|
|
||||||
"${CMAKE_BINARY_DIR}/src/libtomahawk/libtomahawklib.dll"
|
|
||||||
)
|
)
|
||||||
ENDIF( WIN32 )
|
ENDIF( WIN32 )
|
||||||
|
|
||||||
target_link_libraries( tomahawk_siptwitter
|
target_link_libraries( tomahawk_siptwitter
|
||||||
${QT_LIBRARIES}
|
${TOMAHAWK_LIBRARIES}
|
||||||
${OS_SPECIFIC_LINK_LIBRARIES}
|
${QTWEETLIB_LIBRARIES}
|
||||||
tomahawklib
|
${QT_LIBRARIES}
|
||||||
|
${OS_SPECIFIC_LINK_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
IF( APPLE )
|
IF( APPLE )
|
||||||
|
@@ -1,22 +1,23 @@
|
|||||||
#ifndef TOMAHAWKOAUTHTWITTER
|
#ifndef TOMAHAWKOAUTHTWITTER
|
||||||
#define TOMAHAWKOAUTHTWITTER
|
#define TOMAHAWKOAUTHTWITTER
|
||||||
|
|
||||||
|
#include "../sipdllmacro.h"
|
||||||
|
|
||||||
|
#include <qtweetlib_global.h>
|
||||||
#include <oauthtwitter.h>
|
#include <oauthtwitter.h>
|
||||||
|
|
||||||
#include "qtweetlib_global.h"
|
class SIPDLLEXPORT TomahawkOAuthTwitter : public OAuthTwitter
|
||||||
|
|
||||||
class QTWEETLIBSHARED_EXPORT TomahawkOAuthTwitter : public OAuthTwitter
|
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TomahawkOAuthTwitter( QNetworkAccessManager *nam, QObject *parent = 0 );
|
TomahawkOAuthTwitter( QNetworkAccessManager *nam, QObject *parent = 0 );
|
||||||
|
|
||||||
~TomahawkOAuthTwitter() {}
|
~TomahawkOAuthTwitter() {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual int authorizationWidget();
|
virtual int authorizationWidget();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void error();
|
void error();
|
||||||
};
|
};
|
1
thirdparty/CMakeLists.txt
vendored
1
thirdparty/CMakeLists.txt
vendored
@@ -1,5 +1,4 @@
|
|||||||
ADD_SUBDIRECTORY( jdns )
|
ADD_SUBDIRECTORY( jdns )
|
||||||
ADD_SUBDIRECTORY( qtweetlib )
|
|
||||||
ADD_SUBDIRECTORY( libportfwd )
|
ADD_SUBDIRECTORY( libportfwd )
|
||||||
ADD_SUBDIRECTORY( qxt )
|
ADD_SUBDIRECTORY( qxt )
|
||||||
ADD_SUBDIRECTORY( liblastfm2 )
|
ADD_SUBDIRECTORY( liblastfm2 )
|
||||||
|
4
thirdparty/qtweetlib/CMakeLists.txt
vendored
4
thirdparty/qtweetlib/CMakeLists.txt
vendored
@@ -88,8 +88,6 @@ set(TOMAHAWK_QTWEETLIB_SOURCES
|
|||||||
QTweetLib/src/qtweetblockscreate.cpp
|
QTweetLib/src/qtweetblockscreate.cpp
|
||||||
QTweetLib/src/qtweetblocksdestroy.cpp
|
QTweetLib/src/qtweetblocksdestroy.cpp
|
||||||
QTweetLib/src/qtweetblocksexists.cpp
|
QTweetLib/src/qtweetblocksexists.cpp
|
||||||
|
|
||||||
tomahawk-custom/tomahawkoauthtwitter.cpp
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set(TOMAHAWK_QTWEETLIB_HEADERS
|
set(TOMAHAWK_QTWEETLIB_HEADERS
|
||||||
@@ -166,8 +164,6 @@ set(TOMAHAWK_QTWEETLIB_HEADERS
|
|||||||
QTweetLib/src/qtweetblockscreate.h
|
QTweetLib/src/qtweetblockscreate.h
|
||||||
QTweetLib/src/qtweetblocksdestroy.h
|
QTweetLib/src/qtweetblocksdestroy.h
|
||||||
QTweetLib/src/qtweetblocksexists.h
|
QTweetLib/src/qtweetblocksexists.h
|
||||||
|
|
||||||
tomahawk-custom/tomahawkoauthtwitter.h
|
|
||||||
)
|
)
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
|
Reference in New Issue
Block a user