Merge pull request #105 from lactide/build_fixes

Build fixes
This commit is contained in:
vitalyster 2016-02-02 01:01:35 +03:00
commit deee66acde
3 changed files with 9 additions and 4 deletions

View file

@ -3,14 +3,14 @@ FILE(GLOB SRC *.cpp)
ADD_EXECUTABLE(spectrum2_libpurple_backend ${SRC})
if(CMAKE_COMPILER_IS_GNUCXX)
if(MSVC)
target_link_libraries(spectrum2_libpurple_backend sqlite3 ${PURPLE_LIBRARY} ${GLIB2_LIBRARIES} ${LIBXML2_LIBRARIES} ${EVENT_LIBRARIES} transport-plugin ${PROTOBUF_LIBRARY})
else()
if (NOT WIN32)
target_link_libraries(spectrum2_libpurple_backend ${PURPLE_LIBRARY} ${GLIB2_LIBRARIES} ${EVENT_LIBRARIES} transport-plugin pthread)
else()
target_link_libraries(spectrum2_libpurple_backend ${PURPLE_LIBRARY} ${GLIB2_LIBRARIES} ${EVENT_LIBRARIES} transport-plugin)
endif()
else()
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

@ -25,6 +25,11 @@ else ()
target_link_libraries(spectrum2 transport spectrum2-xmpp-frontend spectrum2-slack-frontend ${SWIFTEN_LIBRARY} ${LOG4CXX_LIBRARIES} ${PROTOBUF_LIBRARY})
endif()
if (NOT MSVC)
# export all symbols (used for loading frontends)
set(CMAKE_EXE_LINKER_FLAGS "-Wl,-export-dynamic")
endif()
INSTALL(TARGETS spectrum2 RUNTIME DESTINATION bin)
INSTALL(FILES

View file

@ -8,8 +8,8 @@ SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/../../include/transport/
target_link_libraries(spectrum2_manager transport ${SWIFTEN_LIBRARY} ${PROTOBUF_LIBRARIES})
if (CMAKE_COMPILER_IS_GNUCXX)
add_definitions(-DMG_ENABLE_SSL)
if (CMAKE_COMPILER_IS_GNUCXX)
target_link_libraries(spectrum2_manager ${OPENSSL_LIBRARIES})
endif()