Changeset - 1548f91d4022
[Not reviewed]
0 2 0
Chel Sea (chain) - 13 years ago 2012-11-12 02:41:17
chain@rpgfiction.net
Make Libyahoo2 backend optional (by using ENABLE_YAHOO2)
2 files changed with 15 insertions and 16 deletions:
0 comments (0 inline, 0 general)
CMakeLists.txt
Show inline comments
 
@@ -15,25 +15,25 @@ message(STATUS "|- log4cxx : -DLOG4CXX_INCLUDE_DIR,  -DLOG4CXX_LIBRARY")
 
message(STATUS "|- purple  : -DPURPLE_INCLUDE_DIR,   -DPURPLE_LIBRARY")
 
message(STATUS "           : -DPURPLE_NOT_RUNTIME - enables compilation with libpurple.lib")
 

	
 
option(ENABLE_SQLITE3 "Build with SQLite3 support" ON)
 
option(ENABLE_MYSQL "Build with MySQL support" ON)
 
option(ENABLE_PQXX "Build with Postgres supoort" ON)
 

	
 
#option(ENABLE_FROTZ "Build Frotz plugin" ON)
 
option(ENABLE_IRC "Build IRC plugin" ON)
 
option(ENABLE_PURPLE "Build Libpurple plugin" ON)
 
option(ENABLE_SKYPE "Build Skype plugin" ON)
 
#option(ENABLE_TWITTER "Build Twitter plugin" ON)
 
#option(ENABLE_YAHOO2 "Build Yahoo plugin" ON)
 
option(ENABLE_YAHOO2 "Build Libyahoo2 plugin" ON)
 

	
 
option(ENABLE_DOCS "Build Docs" ON)
 
option(ENABLE_LOG "Build with logging using Log4cxx" ON)
 
option(ENABLE_TESTS "Build Tests using CppUnit" ON)
 

	
 
MACRO(LIST_CONTAINS var value)
 
	SET(${var})
 
	FOREACH (value2 ${ARGN})
 
		IF (${value} STREQUAL ${value2})
 
		SET(${var} TRUE)
 
		ENDIF (${value} STREQUAL ${value2})
 
	ENDFOREACH (value2)
 
@@ -202,28 +202,28 @@ if(ENABLE_IRC)
 
	ADD_DEFINITIONS(-DSUPPORT_LEGACY_CAPS)
 
	# ADD_DEFINITIONS(-DBOOST_FILESYSTEM_VERSION=2)
 
endif()
 

	
 
set(event_DIR "${CMAKE_SOURCE_DIR}/cmake_modules")
 
find_package(event)
 

	
 
if (NOT WIN32 AND ENABLE_SKYPE)
 
set(dbus_DIR "${CMAKE_SOURCE_DIR}/cmake_modules")
 
find_package(dbus)
 
endif()
 

	
 
#if(ENABLE_YAHOO2)
 
#	set(yahoo2_DIR "${CMAKE_SOURCE_DIR}/cmake_modules")
 
#	find_package(yahoo2)
 
#endif()
 
if(ENABLE_YAHOO2)
 
	set(yahoo2_DIR "${CMAKE_SOURCE_DIR}/cmake_modules")
 
	find_package(yahoo2)
 
endif()
 

	
 
####### Miscallanous ######
 

	
 
if(ENABLE_DOCS)
 
	find_package(Doxygen)
 
endif()
 

	
 
if(ENABLE_LOG)
 
	if(LOG4CXX_INCLUDE_DIR AND LOG4CXX_LIBRARY)
 
		set(LOG4CXX_LIBRARIES ${LOG4CXX_LIBRARY})
 
		set(LOG4CXX_FOUND 1)
 
		message(STATUS "Using log4cxx: ${CPPUNIT_INCLUDE_DIR} ${LOG4CXX_INCLUDE_DIR}")
 
@@ -370,35 +370,34 @@ if (PROTOBUF_FOUND)
 
			if(ENABLE_SKYPE)
 
				message("Skype plugin      : no (install dbus-glib-devel)")
 
			else(ENABLE_SKYPE)
 
				message("Skype plugin      : no (user disabled)")
 
			endif()
 
		endif()
 
	else()
 
		message("Frotz plugin      : no")
 
		message("SMSTools3 plugin  : no")
 
		message("Skype plugin      : no")
 
	endif()
 

	
 
#	We have our own copy now...
 
# 	if(YAHOO2_FOUND)
 
	if(ENABLE_YAHOO2)
 
 	if(YAHOO2_FOUND)
 
		message("Libyahoo2 plugin  : yes")
 
# 		include_directories(${YAHOO2_INCLUDE_DIR})
 
 		include_directories(${YAHOO2_INCLUDE_DIR})
 
	else()
 
		message("Libyahoo2 plugin  : no")
 
	endif()
 
# 	else()
 
# 		message("Libyahoo2 plugin  : no (install libyahoo2-devel)")
 
# 	endif()
 
		if(ENABLE_YAHOO2)
 
			message("Libyahoo2 plugin  : no (install libyahoo2-devel)")
 
		else(ENABLE_YAHOO2)
 
			message("Libyahoo2 plugin  : no (user disabled)")
 
		endif()
 
 	endif()
 

	
 
	message("Swiften plugin    : yes")
 
    message("Twitter plugin    : yes")
 

	
 
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)")
 
	message("Swiften plugin    : no (install libprotobuf-dev)")
 
    message("Twitter plugin    : no (install libprotobuf-dev)")
backends/CMakeLists.txt
Show inline comments
 
@@ -6,22 +6,22 @@ if (PROTOBUF_FOUND)
 
	if (IRC_FOUND)
 
		ADD_SUBDIRECTORY(libcommuni)
 
	endif()
 

	
 
	ADD_SUBDIRECTORY(swiften)
 

	
 
	ADD_SUBDIRECTORY(template)
 

	
 

	
 
if (NOT WIN32)
 
	ADD_SUBDIRECTORY(smstools3)
 
	ADD_SUBDIRECTORY(frotz)
 
# 	if(YAHOO2_FOUND)
 
 	if(YAHOO2_FOUND)
 
		ADD_SUBDIRECTORY(libyahoo2)
 
# 	endif()
 
 	endif()
 
	ADD_SUBDIRECTORY(twitter)
 
	if (${LIBDBUSGLIB_FOUND})
 
		ADD_SUBDIRECTORY(skype)
 
	endif()
 
endif()
 

	
 
endif()
0 comments (0 inline, 0 general)