2014-01-09 19:49:11 +08:00
|
|
|
if(WIN32)
|
|
|
|
set(PLATFORM_SRC
|
|
|
|
WebSocket.cpp
|
|
|
|
)
|
2014-02-11 22:21:15 +08:00
|
|
|
|
|
|
|
set(PLATFORM_LINK
|
|
|
|
websockets
|
|
|
|
)
|
|
|
|
elseif(NOT APPLE)
|
|
|
|
set(PLATFORM_SRC
|
|
|
|
WebSocket.cpp
|
|
|
|
)
|
|
|
|
|
2014-01-09 19:49:11 +08:00
|
|
|
set(PLATFORM_LINK
|
|
|
|
websockets
|
2014-02-11 22:21:15 +08:00
|
|
|
ssl
|
|
|
|
crypto
|
2014-01-09 19:49:11 +08:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2013-11-02 18:07:34 +08:00
|
|
|
set(NETWORK_SRC
|
|
|
|
HttpClient.cpp
|
|
|
|
SocketIO.cpp
|
2014-01-09 19:49:11 +08:00
|
|
|
${PLATFORM_SRC}
|
2013-11-02 18:07:34 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
add_library(network STATIC
|
|
|
|
${NETWORK_SRC}
|
|
|
|
)
|
2013-11-04 13:10:04 +08:00
|
|
|
|
|
|
|
target_link_libraries(network
|
|
|
|
curl
|
2014-01-09 19:49:11 +08:00
|
|
|
${PLATFORM_LINK}
|
2013-11-04 13:10:04 +08:00
|
|
|
)
|
2013-11-04 14:49:42 +08:00
|
|
|
|
|
|
|
set_target_properties(network
|
|
|
|
PROPERTIES
|
2014-01-07 15:44:36 +08:00
|
|
|
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
|
|
|
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
2013-11-04 14:49:42 +08:00
|
|
|
)
|
|
|
|
|