fix linux build

This commit is contained in:
WuHuan 2014-01-09 19:49:11 +08:00
parent 2f4b094598
commit f87af9e998
2 changed files with 14 additions and 5 deletions

View File

@ -1,7 +1,16 @@
if(WIN32)
set(PLATFORM_SRC
WebSocket.cpp
)
set(PLATFORM_LINK
websockets
)
endif()
set(NETWORK_SRC
HttpClient.cpp
SocketIO.cpp
WebSocket.cpp
${PLATFORM_SRC}
)
add_library(network STATIC
@ -10,7 +19,7 @@ add_library(network STATIC
target_link_libraries(network
curl
websockets
${PLATFORM_LINK}
)
set_target_properties(network

View File

@ -2,6 +2,9 @@ set(APP_NAME testcpp)
if(WIN32)
set(PLATFORM_SRC
Classes/ExtensionsTest/EditBoxTest/EditBoxTest.cpp
Classes/ExtensionsTest/NetworkTest/WebSocketTest.cpp
Classes/ExtensionsTest/NetworkTest/SocketIOTest.cpp
proj.win32/main.cpp
)
else()
@ -60,10 +63,7 @@ set(SAMPLE_SRC
Classes/ExtensionsTest/TableViewTest/CustomTableViewCell.cpp
Classes/ExtensionsTest/ExtensionsTest.cpp
Classes/ExtensionsTest/NotificationCenterTest/NotificationCenterTest.cpp
Classes/ExtensionsTest/EditBoxTest/EditBoxTest.cpp
Classes/ExtensionsTest/NetworkTest/HttpClientTest.cpp
Classes/ExtensionsTest/NetworkTest/WebSocketTest.cpp
Classes/ExtensionsTest/NetworkTest/SocketIOTest.cpp
Classes/ExtensionsTest/CocoStudioArmatureTest/ArmatureScene.cpp
Classes/ExtensionsTest/CocoStudioComponentsTest/ComponentsTestScene.cpp
Classes/ExtensionsTest/CocoStudioComponentsTest/EnemyController.cpp