Enable twitter plugin on win32

This commit is contained in:
Vitaly Takmazov 2012-12-10 13:03:09 +04:00
parent 0deb1626d7
commit ea0bc80712
4 changed files with 17 additions and 17 deletions

View file

@ -83,10 +83,10 @@ endif()
# FIND SQLITE3
if (ENABLE_SQLITE3)
if (NOT CMAKE_COMPILER_IS_GNUCXX)
ADD_SUBDIRECTORY(msvc-deps)
ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/msvc-deps/sqlite3)
else()
if (WIN32)
ADD_SUBDIRECTORY(msvc-deps/sqlite3)
ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/msvc-deps/sqlite3)
else()
set(sqlite3_DIR "${CMAKE_SOURCE_DIR}/cmake_modules")
find_package(sqlite3)
@ -278,7 +278,7 @@ if (SQLITE3_FOUND)
else (SQLITE3_FOUND)
if (WIN32)
ADD_DEFINITIONS(-DWITH_SQLITE)
include_directories(msvc-deps/sqlite3)
include_directories("${CMAKE_SOURCE_DIR}/msvc-deps/sqlite3")
message("SQLite3 : bundled")
else()
set(SQLITE3_LIBRARIES "")
@ -357,7 +357,11 @@ if (PROTOBUF_FOUND)
message("IRC plugin : no (user disabled)")
endif()
endif()
if(ENABLE_TWITTER)
message("Twitter plugin : yes")
else(ENABLE_TWITTER)
message("Twitter plugin : no (user disabled)")
endif()
if (NOT WIN32)
if(ENABLE_FROTZ)
message("Frotz plugin : yes")
@ -379,16 +383,10 @@ if (PROTOBUF_FOUND)
message("Skype plugin : no (user disabled)")
endif()
endif()
if(ENABLE_TWITTER)
message("Twitter plugin : yes")
else(ENABLE_TWITTER)
message("Twitter plugin : no (user disabled)")
endif()
else()
message("Frotz plugin : no (does not run on Win32)")
message("SMSTools3 plugin : no (does not run on Win32)")
message("Skype plugin : no (does not run on Win32)")
message("Twitter plugin : no (does not run on Win32)")
endif()
if(YAHOO2_FOUND)

View file

@ -12,7 +12,9 @@ if (PROTOBUF_FOUND)
endif()
ADD_SUBDIRECTORY(template)
if(ENABLE_TWITTER)
ADD_SUBDIRECTORY(twitter)
endif()
if (NOT WIN32)
if(ENABLE_SMSTOOLS3)
ADD_SUBDIRECTORY(smstools3)
@ -23,9 +25,6 @@ if (PROTOBUF_FOUND)
if(YAHOO2_FOUND)
ADD_SUBDIRECTORY(libyahoo2)
endif()
if(ENABLE_TWITTER)
ADD_SUBDIRECTORY(twitter)
endif()
if (${LIBDBUSGLIB_FOUND})
ADD_SUBDIRECTORY(skype)
endif()

View file

@ -10,7 +10,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
target_link_libraries(spectrum2_libpurple_backend ${PURPLE_LIBRARY} ${GLIB2_LIBRARIES} ${EVENT_LIBRARIES} transport-plugin)
endif()
else()
target_link_libraries(spectrum2_libpurple_backend ${PURPLE_LIBRARY} ${GLIB2_LIBRARIES} ${LIBXML2_LIBRARIES} ${EVENT_LIBRARIES} transport-plugin ${PROTOBUF_LIBRARY})
target_link_libraries(spectrum2_libpurple_backend sqlite3 ${PURPLE_LIBRARY} ${GLIB2_LIBRARIES} ${LIBXML2_LIBRARIES} ${EVENT_LIBRARIES} transport-plugin ${PROTOBUF_LIBRARY})
endif()
INSTALL(TARGETS spectrum2_libpurple_backend RUNTIME DESTINATION bin)

View file

@ -1,8 +1,11 @@
include_directories (${libtransport_SOURCE_DIR}/backends/twitter/libtwitcurl)
FILE(GLOB SRC *.cpp libtwitcurl/*.cpp Requests/*.cpp)
add_executable(spectrum2_twitter_backend ${SRC})
#add_executable(parser TwitterResponseParser.cpp test.cpp)
if (NOT WIN32)
target_link_libraries(spectrum2_twitter_backend curl transport pthread ${Boost_LIBRARIES} ${SWIFTEN_LIBRARY} ${LOG4CXX_LIBRARIES})
#target_link_libraries(parser curl transport pthread sqlite3 ${Boost_LIBRARIES} ${SWIFTEN_LIBRARY} ${LOG4CXX_LIBRARIES})
else ()
target_link_libraries(spectrum2_twitter_backend libcurl_imp transport ${Boost_LIBRARIES} ${SWIFTEN_LIBRARY} ${LOG4CXX_LIBRARIES})
endif()
INSTALL(TARGETS spectrum2_twitter_backend RUNTIME DESTINATION bin)