1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-11 08:34:34 +02:00

Make gloox an optional dependency

This commit is contained in:
Dominik Schmidt
2011-02-21 16:29:17 +01:00
parent 45756891b4
commit 7ff06c1380
4 changed files with 30 additions and 7 deletions

View File

@@ -1,7 +1,7 @@
PROJECT( tomahawk )
CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )
SET( CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules" )
SET( CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${CMAKE_SOURCE_DIR}/CMakeModules" )
SET( THIRDPARTY_DIR ${CMAKE_SOURCE_DIR}/thirdparty )
# Check if we need qtgui:
@@ -18,12 +18,22 @@ FIND_PACKAGE( Taglib 1.6.0 REQUIRED )
include( CheckTagLibFileName )
check_taglib_filename( COMPLEX_TAGLIB_FILENAME )
# required deps
FIND_PACKAGE( LibLastFm 0.3.3 REQUIRED )
FIND_PACKAGE( LibEchonest 1.1.1 REQUIRED )
FIND_PACKAGE( CLucene 0.9.23 REQUIRED )
FIND_PACKAGE( Gloox 1.0 REQUIRED )
FIND_PACKAGE( QJSON REQUIRED )
# optional deps
INCLUDE( MacroOptionalFindPackage )
INCLUDE( MacroLogFeature )
macro_optional_find_package(Gloox 1.0)
macro_log_feature(Gloox_FOUND "Gloox" "A portable high-level Jabber/XMPP library for C++" "http://camaya.net/gloox" FALSE "" "Gloox is needed for the Jabber SIP plugin and the XMPP-Bot")
macro_display_feature_log()
ADD_SUBDIRECTORY( thirdparty )
ADD_SUBDIRECTORY( src/libtomahawk )
ADD_SUBDIRECTORY( src )

View File

@@ -33,7 +33,6 @@ SET( tomahawkSources ${tomahawkSources}
infosystem/infoplugins/echonestplugin.cpp
infosystem/infoplugins/musixmatchplugin.cpp
xmppbot/xmppbot.cpp
web/api_v1.cpp
musicscanner.cpp
@@ -74,7 +73,7 @@ SET( tomahawkHeaders ${tomahawkHeaders}
infosystem/infoplugins/echonestplugin.h
infosystem/infoplugins/musixmatchplugin.h
xmppbot/xmppbot.h
web/api_v1.h
musicscanner.h
@@ -84,6 +83,7 @@ SET( tomahawkHeaders ${tomahawkHeaders}
shortcuthandler.h
)
SET( tomahawkHeadersGui ${tomahawkHeadersGui}
sourcetree/sourcesmodel.h
sourcetree/sourcetreeitem.h
@@ -142,6 +142,10 @@ IF( UNIX )
INCLUDE( "CMakeLists.unix.txt" )
ENDIF( UNIX )
IF(Gloox_FOUND)
ADD_SUBDIRECTORY( xmppbot )
ENDIF(Gloox_FOUND)
ADD_SUBDIRECTORY( sip )
kde4_add_app_icon( tomahawkSources "${CMAKE_SOURCE_DIR}/data/icons/tomahawk-icon-*.png" )
@@ -181,7 +185,6 @@ TARGET_LINK_LIBRARIES( tomahawk
${OS_SPECIFIC_LINK_LIBRARIES}
${LIBECHONEST_LIBRARY}
${LIBLASTFM_LIBRARY}
${GLOOX_LIBRARIES}
${QXTWEB_LIBRARIES}
${QTWEETLIB_LIBRARIES}
${QJSON_LIBRARIES}

View File

@@ -1,3 +1,7 @@
ADD_SUBDIRECTORY( jabber )
IF(Gloox_FOUND)
ADD_SUBDIRECTORY( jabber )
ENDIF(Gloox_FOUND)
ADD_SUBDIRECTORY( twitter )
ADD_SUBDIRECTORY( zeroconf )

View File

@@ -20,7 +20,6 @@
#include "playlist/dynamic/GeneratorFactory.h"
#include "playlist/dynamic/echonest/EchonestGenerator.h"
#include "utils/tomahawkutils.h"
#include "xmppbot/xmppbot.h"
#include "web/api_v1.h"
#include "scriptresolver.h"
#include "sourcelist.h"
@@ -37,6 +36,11 @@
#include <QMessageBox>
#endif
// should go to a plugin actually
#ifdef Gloox_FOUND
#include "xmppbot/xmppbot.h"
#endif
#ifdef Q_WS_MAC
#include "mac/macshortcuthandler.h"
#endif
@@ -475,6 +479,7 @@ TomahawkApp::setupSIP()
{
qDebug() << Q_FUNC_INFO;
#ifdef Gloox_FOUND
//FIXME: jabber autoconnect is really more, now that there is sip -- should be renamed and/or split out of jabber-specific settings
if( !arguments().contains( "--nosip" ) && TomahawkSettings::instance()->jabberAutoConnect() )
{
@@ -483,6 +488,7 @@ TomahawkApp::setupSIP()
m_sipHandler->connectPlugins( true );
// m_sipHandler->setProxy( *TomahawkUtils::proxy() );
}
#endif
}