Changeset - 2442a31dfd32
[Not reviewed]
4 4 1
Jan Kaluza - 13 years ago 2012-02-16 10:26:47
hanzz.k@gmail.com
Find dbus
9 files changed with 68 insertions and 429 deletions:
0 comments (0 inline, 0 general)
CMakeLists.txt
Show inline comments
 
@@ -56,6 +56,9 @@ find_package(event)
 
set(pqxx_DIR "${CMAKE_SOURCE_DIR}/cmake_modules")
 
find_package(pqxx)
 

	
 
set(dbus_DIR "${CMAKE_SOURCE_DIR}/cmake_modules")
 
find_package(dbus)
 

	
 
find_package(Doxygen)
 

	
 
INCLUDE(FindQt4)
 
@@ -146,12 +149,21 @@ if (PROTOBUF_FOUND)
 
	endif()
 

	
 
	message("Frotz plugin      : yes")
 
	message("SMSTools3 plugin  : yes")
 

	
 
	if(${LIBDBUSGLIB_FOUND})
 
		message("Skype plugin      : yes")
 
		include_directories(${LIBDBUSGLIB_INCLUDE_DIRS})
 
	else()
 
		message("Skype plugin      : no (install dbus-glib-devel)")
 
	endif()
 

	
 
else()
 
	message("Network plugins   : no (install libprotobuf-dev)")
 
	message("Libpurple plugin  : no (install libpurple and libprotobuf-dev)")
 
	message("IRC plugin        : no (install libircclient-qt and libprotobuf-dev)")
 
	message("Frotz plugin      : no (install libprotobuf-dev)")
 
	message("SMSTools3 plugin  : no (install libprotobuf-dev)")
 
endif()
 

	
 
if (LOG4CXX_FOUND)
backends/CMakeLists.txt
Show inline comments
 
@@ -11,7 +11,7 @@ if (PROTOBUF_FOUND)
 

	
 
if (NOT WIN32)
 
	ADD_SUBDIRECTORY(frotz)
 
#	ADD_SUBDIRECTORY(skype)
 
	ADD_SUBDIRECTORY(skype)
 
endif()
 

	
 
endif()
backends/skype/CMakeLists.txt
Show inline comments
 
cmake_minimum_required(VERSION 2.6)
 
FILE(GLOB SRC *.cpp)
 

	
 
include_directories(/usr/include/dbus-1.0/)
 
include_directories(/usr/lib/dbus-1.0/include/)
 
include_directories(/usr/lib64/dbus-1.0/include/)
 
 
ADD_EXECUTABLE(spectrum2_skype_backend ${SRC})
 
 
target_link_libraries(spectrum2_skype_backend ${GLIB2_LIBRARIES} ${EVENT_LIBRARIES} transport pthread dbus-glib-1 dbus-1 gobject-2.0 transport-plugin)
 
target_link_libraries(spectrum2_skype_backend ${GLIB2_LIBRARIES} ${EVENT_LIBRARIES} transport pthread ${LIBDBUSGLIB_LIBRARIES} transport-plugin)
 
 
INSTALL(TARGETS spectrum2_skype_backend RUNTIME DESTINATION bin)
 
backends/skype/geventloop.cpp
Show inline comments
 
deleted file
backends/skype/geventloop.h
Show inline comments
 
deleted file
backends/skype/main.cpp
Show inline comments
 
@@ -12,9 +12,7 @@
 
#include "transport/rostermanager.h"
 
#include "transport/conversation.h"
 
#include "transport/networkplugin.h"
 
#include "spectrumeventloop.h"
 
#include <boost/filesystem.hpp>
 
#include "geventloop.h"
 
#include "log4cxx/logger.h"
 
#include "log4cxx/consoleappender.h"
 
#include "log4cxx/patternlayout.h"
 
@@ -773,7 +771,7 @@ int main(int argc, char **argv) {
 

	
 

	
 
	GIOChannel *channel;
 
	GIOCondition cond = (GIOCondition) READ_COND;
 
	GIOCondition cond = (GIOCondition) G_IO_IN;
 
	channel = g_io_channel_unix_new(m_sock);
 
	g_io_add_watch_full(channel, G_PRIORITY_DEFAULT, cond, transportDataReceived, NULL, io_destroy);
 

	
backends/skype/spectrumeventloop.cpp
Show inline comments
 
deleted file
backends/skype/spectrumeventloop.h
Show inline comments
 
deleted file
cmake_modules/dbusConfig.cmake
Show inline comments
 
new file 100644
 
# - Try to find LIBDBUS GLIB Bindings
 
# Find LIBDBUSGLIB headers, libraries and the answer to all questions.
 
#
 
#  LIBDBUSGLIB_FOUND               True if libdbus-glib got found
 
#  LIBDBUSGLIB_INCLUDE_DIRS        Location of libdbus-glib headers 
 
#  LIBDBUSGLIB_LIBRARIES           List of libraries to use libdbus-glib 
 
#
 
# Copyright (c) 2008 Bjoern Ricks <bjoern.ricks@googlemail.com>
 
#
 
#  Redistribution and use is allowed according to the terms of the New
 
#  BSD license.
 
#  For details see the accompanying COPYING-CMAKE-SCRIPTS file.
 
#
 

	
 
INCLUDE( FindPkgConfig )
 

	
 
IF ( LibDbusGlib_FIND_REQUIRED )
 
	SET( _pkgconfig_REQUIRED "REQUIRED" )
 
ELSE( LibDbusGlib_FIND_REQUIRED )
 
	SET( _pkgconfig_REQUIRED "" )	
 
ENDIF ( LibDbusGlib_FIND_REQUIRED )
 

	
 
IF ( LIBDBUSGLIB_MIN_VERSION )
 
	PKG_SEARCH_MODULE( LIBDBUSGLIB ${_pkgconfig_REQUIRED} dbus-glib-1>=${LIBDBUSGLIB_MIN_VERSION} )
 
ELSE ( LIBDBUSGLIB_MIN_VERSION )
 
	PKG_SEARCH_MODULE( LIBDBUSGLIB ${_pkgconfig_REQUIRED} dbus-glib-1 )
 
ENDIF ( LIBDBUSGLIB_MIN_VERSION )
 

	
 

	
 
IF( NOT LIBDBUSGLIB_FOUND AND NOT PKG_CONFIG_FOUND )
 
	FIND_PATH( LIBDBUSGLIB_INCLUDE_DIRS dbus/dbus-glib.h PATH_SUFFIXES dbus-1.0 dbus )
 
	FIND_LIBRARY( LIBDBUSGLIB_LIBRARIES dbus-glib dbus-glib-1)
 

	
 
	# Report results
 
	IF ( LIBDBUSGLIB_LIBRARIES AND LIBDBUSGLIB_INCLUDE_DIRS )	
 
		SET( LIBDBUSGLIB_FOUND 1 )
 
		IF ( NOT LIBDBUSGLIB_FIND_QUIETLY )
 
			MESSAGE( STATUS "Found libdbus-glib: ${LIBDBUSGLIB_LIBRARIES} ${LIBDBUSGLIB_INCLUDE_DIRS}" )
 
		ENDIF ( NOT LIBDBUSGLIB_FIND_QUIETLY )
 
	ELSE ( LIBDBUSGLIB_LIBRARIES AND LIBDBUSGLIB_INCLUDE_DIRS )	
 
		IF ( LIBDBUSGLIB_FIND_REQUIRED )
 
			MESSAGE( SEND_ERROR "Could NOT find libdbus-glib" )
 
		ELSE ( LIBDBUSGLIB_FIND_REQUIRED )
 
			IF ( NOT LIBDBUSGLIB_FIND_QUIETLY )
 
				MESSAGE( STATUS "Could NOT find libdbus-glib" )	
 
			ENDIF ( NOT LIBDBUSGLIB_FIND_QUIETLY )
 
		ENDIF ( LIBDBUSGLIB_FIND_REQUIRED )
 
	ENDIF ( LIBDBUSGLIB_LIBRARIES AND LIBDBUSGLIB_INCLUDE_DIRS )
 
else()
 
	MESSAGE( STATUS "Found libdbus-glib: ${LIBDBUSGLIB_LIBRARIES} ${LIBDBUSGLIB_INCLUDE_DIRS}" )
 
ENDIF()
 

	
 
MARK_AS_ADVANCED( LIBDBUSGLIB_LIBRARIES LIBDBUSGLIB_INCLUDE_DIRS )
 
\ No newline at end of file
0 comments (0 inline, 0 general)