fix compilation 2
This commit is contained in:
parent
57283d68d1
commit
15bdfab39c
3 changed files with 13 additions and 6 deletions
|
@ -13,9 +13,13 @@ find_package(cppunit)
|
|||
if (NOT CMAKE_COMPILER_IS_GNUCXX)
|
||||
ADD_SUBDIRECTORY(msvc-deps)
|
||||
else()
|
||||
if (WIN32)
|
||||
ADD_SUBDIRECTORY(msvc-deps/sqlite3)
|
||||
else()
|
||||
set(sqlite3_DIR "${CMAKE_SOURCE_DIR}/cmake_modules")
|
||||
find_package(sqlite3)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(mysql_DIR "${CMAKE_SOURCE_DIR}/cmake_modules")
|
||||
find_package(mysql)
|
||||
|
@ -120,7 +124,6 @@ else (SQLITE3_FOUND)
|
|||
if (WIN32)
|
||||
ADD_DEFINITIONS(-DWITH_SQLITE)
|
||||
include_directories(msvc-deps/sqlite3)
|
||||
set (SQLITE3_LIBRARIES "${CMAKE_SOURCE_DIR}/msvc-deps/sqlite3/sqlite3.lib")
|
||||
message("SQLite3 : bundled")
|
||||
else()
|
||||
set(SQLITE3_LIBRARIES "")
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
// Swiften
|
||||
#include "Swiften/Swiften.h"
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#ifndef _WIN32
|
||||
// for signal handler
|
||||
#include "unistd.h"
|
||||
#include "signal.h"
|
||||
|
@ -79,7 +79,7 @@ class TemplatePlugin : public NetworkPlugin {
|
|||
Config *config;
|
||||
};
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#ifndef _WIN32
|
||||
|
||||
static void spectrum_sigchld_handler(int sig)
|
||||
{
|
||||
|
@ -102,7 +102,7 @@ int main (int argc, char* argv[]) {
|
|||
std::string host;
|
||||
int port;
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#ifndef _WIN32
|
||||
if (signal(SIGCHLD, spectrum_sigchld_handler) == SIG_ERR) {
|
||||
std::cout << "SIGCHLD handler can't be set\n";
|
||||
return -1;
|
||||
|
|
|
@ -47,8 +47,12 @@ endif()
|
|||
if (NOT CMAKE_COMPILER_IS_GNUCXX)
|
||||
include_directories("${CMAKE_SOURCE_DIR}/msvc-deps/protobuf/libprotobuf")
|
||||
TARGET_LINK_LIBRARIES(transport transport-plugin sqlite3 libprotobuf ${PQXX_LIBRARY} ${PQ_LIBRARY} ${MYSQL_LIBRARIES} ${SWIFTEN_LIBRARY} ${LOG4CXX_LIBRARIES})
|
||||
else (WIN32)
|
||||
TARGET_LINK_LIBRARIES(transport transport-plugin ${PQXX_LIBRARY} ${PQ_LIBRARY} ${SQLITE3_LIBRARIES} ${MYSQL_LIBRARIES} ${SWIFTEN_LIBRARY} ${PROTOBUF_LIBRARIES} ${LOG4CXX_LIBRARIES} ${POPT_LIBRARY})
|
||||
else ()
|
||||
if (WIN32)
|
||||
TARGET_LINK_LIBRARIES(transport transport-plugin sqlite3 ${PQXX_LIBRARY} ${PQ_LIBRARY} ${MYSQL_LIBRARIES} ${SWIFTEN_LIBRARY} ${LOG4CXX_LIBRARIES} ${PROTOBUF_LIBRARIES})
|
||||
else()
|
||||
TARGET_LINK_LIBRARIES(transport transport-plugin ${PQXX_LIBRARY} ${PQ_LIBRARY} ${SQLITE3_LIBRARIES} ${MYSQL_LIBRARIES} ${SWIFTEN_LIBRARY} ${PROTOBUF_LIBRARIES} ${LOG4CXX_LIBRARIES} ${POPT_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
SET_TARGET_PROPERTIES(transport PROPERTIES
|
||||
|
|
Loading…
Add table
Reference in a new issue