Last change
on this file since 2172 was
2131,
checked in by rgrieder, 16 years ago
|
Added CMakeLists.txt to every subfolder and adjusted accordingly.
The CMake script I have written can be used as follows:
ADD_SOURCE_DIRECTORY(_source_list directory) # Adds a new source subdirectory where _source_list is the name of the source list in CURRENT folder
ADD_SOURCE_FILES(_source_list) # Adds the source files in a subdirectory to the source list in the super directory (has to be called!)
Note: When adding more subdirectories in a subdirectory, call ADD_SOURCE_FILES after ADD_SOURCE_DIRECTORY!
|
-
Property svn:eol-style set to
native
|
File size:
993 bytes
|
Line | |
---|
1 | SET( NETWORK_SRC_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 | |
---|
17 | ADD_SOURCE_DIRECTORY(NETWORK_SRC_FILES packet) |
---|
18 | |
---|
19 | IF(WIN32) |
---|
20 | ADD_LIBRARY( network ${NETWORK_SRC_FILES} ) |
---|
21 | ELSE(WIN32) |
---|
22 | ADD_LIBRARY( network SHARED ${NETWORK_SRC_FILES} ) |
---|
23 | ENDIF(WIN32) |
---|
24 | |
---|
25 | TARGET_LINK_LIBRARIES( network |
---|
26 | ${ZLIB_LIBRARY} |
---|
27 | ${ENet_LIBRARY} |
---|
28 | ${Boost_thread_LIBRARIES} |
---|
29 | core |
---|
30 | ) |
---|
31 | |
---|
32 | |
---|
33 | # build those parts only on request. |
---|
34 | IF(NETWORK_TESTING_ENABLED) |
---|
35 | ##### test for gamestate stuff ##### |
---|
36 | SET( TEST_SRC_FILES |
---|
37 | ${NETWORK_SRC_FILES} |
---|
38 | ) |
---|
39 | ADD_EXECUTABLE(networktest ${TEST_SRC_FILES}) |
---|
40 | TARGET_LINK_LIBRARIES( networktest |
---|
41 | ${OGRE_LIBRARIES} |
---|
42 | network |
---|
43 | ${ENet_LIBRARY} |
---|
44 | ${ZLIB_LIBRARY} |
---|
45 | ${WINDOWS_ENET_DEPENDENCIES} |
---|
46 | ) |
---|
47 | ##### end test for gamestate stuff ##### |
---|
48 | ENDIF(NETWORK_TESTING_ENABLED) |
---|
Note: See
TracBrowser
for help on using the repository browser.