Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/buildsystem2/src/network/CMakeLists.txt @ 2594

Last change on this file since 2594 was 2588, checked in by rgrieder, 16 years ago

Visual Studio generator working for all build types. Compiles but does not run yet.

  • Had to define some export symbols
  • tinyxml and cpptcl have to be linked statically
  • some other libraries can be linked shared that were linked statically for windows (now for mingw only)
  • added two macros: ADD_CXX_FLAG(_flag _condition) and ADD_C_FLAG(_flag _condition)
  • Property svn:eol-style set to native
File size: 1.1 KB
Line 
1ADD_SOURCE_FILES(
2  ChatListener.cc
3  Client.cc
4  ClientConnection.cc
5  ClientInformation.cc
6  ClientConnectionListener.cc
7  ConnectionManager.cc
8  GamestateManager.cc
9  GamestateClient.cc
10  GamestateHandler.cc
11  PacketBuffer.cc
12  Server.cc
13  Synchronisable.cc
14  Host.cc
15)
16
17ADD_SOURCE_DIRECTORY(packet)
18
19WRITE_SOURCE_FILES(NETWORK_SRC_FILES)
20
21IF(MINGW)
22  ADD_LIBRARY( network ${NETWORK_SRC_FILES} )
23ELSE(MINGW)
24  ADD_LIBRARY( network SHARED ${NETWORK_SRC_FILES} )
25ENDIF(MINGW)
26
27SET_TARGET_PROPERTIES(network PROPERTIES DEFINE_SYMBOL "NETWORK_SHARED_BUILD")
28TARGET_LINK_LIBRARIES(network
29  ${ZLIB_LIBRARY}
30  ${ENET_LIBRARY}
31  ${Boost_THREAD_LIBRARY}
32  util
33  core
34)
35
36IF (NOT WIN32)
37  INSTALL(TARGETS network LIBRARY DESTINATION lib)
38ENDIF (NOT WIN32)
39
40# build those parts only on request.
41IF(NETWORK_TESTING_ENABLED)
42  ##### test for gamestate stuff #####
43  SET( TEST_SRC_FILES
44    ${NETWORK_SRC_FILES}
45  )
46  ADD_EXECUTABLE(networktest ${TEST_SRC_FILES})
47  TARGET_LINK_LIBRARIES( networktest
48    ${OGRE_LIBRARY}
49    network
50    ${ENET_LIBRARY}
51    ${ZLIB_LIBRARY}
52  )
53  ##### end test for gamestate stuff #####
54ENDIF(NETWORK_TESTING_ENABLED)
Note: See TracBrowser for help on using the repository browser.