diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9053aa4d57546ff3ed5c5432bb7f7fe9b61b57d5..101718529f52f453300288d2147799c3ef730e44 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -3,7 +3,7 @@ FILE(GLOB SRC *.cpp *.h) FILE(GLOB_RECURSE SWIFTEN_SRC ../include/Swiften/*.cpp) # Build without openssl on msvc -if (CMAKE_COMPILER_IS_GNUCXX) +if (NOT MSVC) string(REGEX REPLACE "[^;]+;?/Schannel/[^;]+;?" "" SWIFTEN_SRC "${SWIFTEN_SRC}") else() string(REGEX REPLACE "[^;]+;?/OpenSSL/[^;]+;?" "" SWIFTEN_SRC "${SWIFTEN_SRC}") @@ -47,7 +47,7 @@ endif(PROTOBUF_FOUND) if (WIN32) include_directories("${CMAKE_SOURCE_DIR}/msvc-deps/sqlite3") - TARGET_LINK_LIBRARIES(transport transport-plugin sqlite3 ${PQXX_LIBRARY} ${PQ_LIBRARY} ${MYSQL_LIBRARIES} ${SWIFTEN_LIBRARY} ${LOG4CXX_LIBRARIES} ${PROTOBUF_LIBRARY}) + TARGET_LINK_LIBRARIES(transport transport-plugin sqlite3 ${PQXX_LIBRARY} ${PQ_LIBRARY} ${MYSQL_LIBRARIES} ${SWIFTEN_LIBRARY} ${LOG4CXX_LIBRARIES} ${PROTOBUF_LIBRARY} psapi.lib) else() TARGET_LINK_LIBRARIES(transport transport-plugin ${PQXX_LIBRARY} ${PQ_LIBRARY} ${SQLITE3_LIBRARIES} ${MYSQL_LIBRARIES} ${SWIFTEN_LIBRARY} ${LOG4CXX_LIBRARIES} ${POPT_LIBRARY} ${PROTOBUF_LIBRARY}) endif() @@ -55,6 +55,9 @@ endif() SET_TARGET_PROPERTIES(transport PROPERTIES VERSION ${TRANSPORT_VERSION} SOVERSION ${TRANSPORT_VERSION} ) +if (APPLE) + TARGET_LINK_LIBRARIES(transport ${APPLE_FRAMEWORKS}) +endif() INSTALL(TARGETS transport LIBRARY DESTINATION ${LIB_INSTALL_DIR} ARCHIVE DESTINATION ${LIB_INSTALL_DIR} COMPONENT libraries)