From 1548f91d4022e70a51e43b75ce2b7b7ea631f6e1 Mon Sep 17 00:00:00 2001 From: chain Date: Mon, 12 Nov 2012 02:41:17 +0100 Subject: [PATCH] Make Libyahoo2 backend optional (by using ENABLE_YAHOO2) --- CMakeLists.txt | 27 +++++++++++++-------------- backends/CMakeLists.txt | 4 ++-- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d162e877..213fc1e0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,7 +24,7 @@ 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) @@ -211,10 +211,10 @@ 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 ###### @@ -379,17 +379,16 @@ if (PROTOBUF_FOUND) 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") diff --git a/backends/CMakeLists.txt b/backends/CMakeLists.txt index ac9b6f0b..3b843b1c 100644 --- a/backends/CMakeLists.txt +++ b/backends/CMakeLists.txt @@ -15,9 +15,9 @@ if (PROTOBUF_FOUND) 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)