mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-20 16:02:07 +02:00
Make siptwitter optional and rely on system qtweetlib on default
This commit is contained in:
parent
a564d53ff3
commit
2590ae4ece
@ -77,7 +77,21 @@ IF( INTERNAL_JREEN )
|
||||
ELSE( INTERNAL_JREEN )
|
||||
macro_optional_find_package(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
|
||||
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}
|
||||
${LIBECHONEST_LIBRARY}
|
||||
${QXTWEB_LIBRARIES}
|
||||
${QTWEETLIB_LIBRARIES}
|
||||
${QJSON_LIBRARIES}
|
||||
${TAGLIB_LIBRARIES}
|
||||
${QTWEETLIB_LIBRARIES}
|
||||
${CLUCENE_LIBRARIES}
|
||||
)
|
||||
|
||||
|
@ -6,7 +6,6 @@ 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
|
||||
|
@ -362,7 +362,6 @@ include_directories( . ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/.
|
||||
${THIRDPARTY_DIR}/jdns
|
||||
${THIRDPARTY_DIR}/jdns/jdns
|
||||
${THIRDPARTY_DIR}/jdns/jdnsshared
|
||||
${THIRDPARTY_DIR}/qtweetlib/qtweetlib/src
|
||||
${CMAKE_BINARY_DIR}/thirdparty/liblastfm2/src
|
||||
)
|
||||
|
||||
@ -419,12 +418,12 @@ add_library( tomahawklib SHARED ${libSources} ${libMoc} )
|
||||
target_link_libraries( tomahawklib
|
||||
# Internal
|
||||
tomahawk_jdns
|
||||
tomahawk_qtweetlib
|
||||
|
||||
# Thirdparty shipped with tomahawk
|
||||
portfwd
|
||||
|
||||
# External deps
|
||||
${QJSON_LIBRARIES}
|
||||
${PHONON_LIBS}
|
||||
${TAGLIB_LIBRARIES}
|
||||
${CLUCENE_LIBRARIES}
|
||||
|
@ -2,5 +2,8 @@ IF( LIBJREEN_FOUND )
|
||||
ADD_SUBDIRECTORY( jabber )
|
||||
ENDIF( LIBJREEN_FOUND )
|
||||
|
||||
ADD_SUBDIRECTORY( twitter )
|
||||
IF( QTWEETLIB_FOUND )
|
||||
ADD_SUBDIRECTORY( twitter )
|
||||
ENDIF( QTWEETLIB_FOUND )
|
||||
|
||||
ADD_SUBDIRECTORY( zeroconf )
|
||||
|
@ -9,11 +9,13 @@ add_definitions( -DSIPDLLEXPORT_PRO )
|
||||
set( twitterSources
|
||||
twitter.cpp
|
||||
twitterconfigwidget.cpp
|
||||
tomahawkoauthtwitter.cpp
|
||||
)
|
||||
|
||||
set( twitterHeaders
|
||||
twitter.h
|
||||
twitterconfigwidget.h
|
||||
tomahawkoauthtwitter.h
|
||||
)
|
||||
|
||||
set( twitterUI
|
||||
@ -22,8 +24,7 @@ set( twitterUI
|
||||
|
||||
include_directories( . ${CMAKE_CURRENT_BINARY_DIR} ..
|
||||
${QT_INCLUDE_DIR}
|
||||
${CMAKE_SOURCE_DIR}/thirdparty/qtweetlib/QTweetLib/src
|
||||
${CMAKE_SOURCE_DIR}/thirdparty/qtweetlib/tomahawk-custom
|
||||
${QTWEETLIB_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
qt4_add_resources( RC_SRCS "resources.qrc" )
|
||||
@ -36,15 +37,14 @@ SET( OS_SPECIFIC_LINK_LIBRARIES
|
||||
${OS_SPECIFIC_LINK_LIBRARIES}
|
||||
"winmm.dll"
|
||||
"iphlpapi.a"
|
||||
"${CMAKE_BINARY_DIR}/thirdparty/qtweetlib/libtomahawk_qtweetlib.dll"
|
||||
"${CMAKE_BINARY_DIR}/src/libtomahawk/libtomahawklib.dll"
|
||||
)
|
||||
ENDIF( WIN32 )
|
||||
|
||||
target_link_libraries( tomahawk_siptwitter
|
||||
${QT_LIBRARIES}
|
||||
${OS_SPECIFIC_LINK_LIBRARIES}
|
||||
tomahawklib
|
||||
${TOMAHAWK_LIBRARIES}
|
||||
${QTWEETLIB_LIBRARIES}
|
||||
${QT_LIBRARIES}
|
||||
${OS_SPECIFIC_LINK_LIBRARIES}
|
||||
)
|
||||
|
||||
IF( APPLE )
|
||||
|
@ -1,22 +1,23 @@
|
||||
#ifndef TOMAHAWKOAUTHTWITTER
|
||||
#define TOMAHAWKOAUTHTWITTER
|
||||
|
||||
#include "../sipdllmacro.h"
|
||||
|
||||
#include <qtweetlib_global.h>
|
||||
#include <oauthtwitter.h>
|
||||
|
||||
#include "qtweetlib_global.h"
|
||||
|
||||
class QTWEETLIBSHARED_EXPORT TomahawkOAuthTwitter : public OAuthTwitter
|
||||
class SIPDLLEXPORT TomahawkOAuthTwitter : public OAuthTwitter
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
public:
|
||||
TomahawkOAuthTwitter( QNetworkAccessManager *nam, QObject *parent = 0 );
|
||||
|
||||
~TomahawkOAuthTwitter() {}
|
||||
|
||||
|
||||
protected:
|
||||
virtual int authorizationWidget();
|
||||
|
||||
|
||||
private slots:
|
||||
void error();
|
||||
};
|
1
thirdparty/CMakeLists.txt
vendored
1
thirdparty/CMakeLists.txt
vendored
@ -1,5 +1,4 @@
|
||||
ADD_SUBDIRECTORY( jdns )
|
||||
ADD_SUBDIRECTORY( qtweetlib )
|
||||
ADD_SUBDIRECTORY( libportfwd )
|
||||
ADD_SUBDIRECTORY( qxt )
|
||||
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/qtweetblocksdestroy.cpp
|
||||
QTweetLib/src/qtweetblocksexists.cpp
|
||||
|
||||
tomahawk-custom/tomahawkoauthtwitter.cpp
|
||||
)
|
||||
|
||||
set(TOMAHAWK_QTWEETLIB_HEADERS
|
||||
@ -166,8 +164,6 @@ set(TOMAHAWK_QTWEETLIB_HEADERS
|
||||
QTweetLib/src/qtweetblockscreate.h
|
||||
QTweetLib/src/qtweetblocksdestroy.h
|
||||
QTweetLib/src/qtweetblocksexists.h
|
||||
|
||||
tomahawk-custom/tomahawkoauthtwitter.h
|
||||
)
|
||||
|
||||
include_directories(
|
||||
|
Loading…
x
Reference in New Issue
Block a user