diff --git a/backends/CMakeLists.txt b/backends/CMakeLists.txt index 761249d7..63de7f0d 100644 --- a/backends/CMakeLists.txt +++ b/backends/CMakeLists.txt @@ -7,8 +7,6 @@ if (PROTOBUF_FOUND) ADD_SUBDIRECTORY(libcommuni) endif() - ADD_SUBDIRECTORY(smstools3) - ADD_SUBDIRECTORY(swiften) ADD_SUBDIRECTORY(template) diff --git a/backends/swiften/CMakeLists.txt b/backends/swiften/CMakeLists.txt index d8861e05..b605a947 100644 --- a/backends/swiften/CMakeLists.txt +++ b/backends/swiften/CMakeLists.txt @@ -4,7 +4,11 @@ FILE(GLOB SRC *.cpp) ADD_EXECUTABLE(spectrum2_swiften_backend ${SRC}) +IF (NOT WIN32) target_link_libraries(spectrum2_swiften_backend transport pthread ${Boost_LIBRARIES} ${SWIFTEN_LIBRARY} ${LOG4CXX_LIBRARIES}) +else() +target_link_libraries(spectrum2_swiften_backend transport ${Boost_LIBRARIES} ${SWIFTEN_LIBRARY} ${LOG4CXX_LIBRARIES}) +endif() INSTALL(TARGETS spectrum2_swiften_backend RUNTIME DESTINATION bin) diff --git a/backends/swiften/main.cpp b/backends/swiften/main.cpp index 642930fc..a9a24070 100644 --- a/backends/swiften/main.cpp +++ b/backends/swiften/main.cpp @@ -6,11 +6,13 @@ // Swiften #include "Swiften/Swiften.h" +#ifndef WIN32 // for signal handler #include "unistd.h" #include "signal.h" #include "sys/wait.h" #include "sys/signal.h" +#endif // malloc_trim #include "malloc.h" @@ -231,6 +233,7 @@ class SwiftenPlugin : public NetworkPlugin { std::map > m_users; }; +#ifndef WIN32 static void spectrum_sigchld_handler(int sig) { int status; @@ -246,16 +249,19 @@ static void spectrum_sigchld_handler(int sig) perror(errmsg); } } +#endif int main (int argc, char* argv[]) { std::string host; int port; +#ifndef WIN32 if (signal(SIGCHLD, spectrum_sigchld_handler) == SIG_ERR) { std::cout << "SIGCHLD handler can't be set\n"; return -1; } +#endif boost::program_options::options_description desc("Usage: spectrum [OPTIONS] \nAllowed options"); desc.add_options()