axmol/cocos/network/CMakeLists.txt

38 lines
612 B
CMake
Raw Normal View History

2014-08-06 22:43:19 +08:00
if(WINDOWS)
set(PLATFORM_LINK websockets)
elseif(LINUX)
set(PLATFORM_LINK websockets ssl crypto)
2014-01-09 19:49:11 +08:00
endif()
set(COCOS_NETWORK_SRC
HttpClient.cpp
SocketIO.cpp
WebSocket.cpp
2013-11-02 18:07:34 +08:00
)
add_library(network STATIC
${COCOS_NETWORK_SRC}
)
2014-08-06 22:43:19 +08:00
if(MSVC)
set(COCOS_NETWORK_LINK
libcurl_imp
${PLATFORM_LINK}
)
2014-08-06 22:43:19 +08:00
else()
set(COCOS_NETWORK_LINK
curl
${PLATFORM_LINK}
)
2014-08-06 22:43:19 +08:00
endif()
target_link_libraries(network
${COCOS_NETWORK_LINK}
)
set_target_properties(network
PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
)