diff options
author | Loic Blot <loic.blot@unix-experience.fr> | 2015-02-21 11:51:12 +0100 |
---|---|---|
committer | Loic Blot <loic.blot@unix-experience.fr> | 2015-02-21 11:51:12 +0100 |
commit | cf4045ff0f7c96614e64b2b336e62a240f443ea6 (patch) | |
tree | 7229e1a72487b22d55aba067b15619490d730d58 /src | |
parent | 81930b17297bbb3c5f938d202c68903b18c83734 (diff) | |
download | minetest-cf4045ff0f7c96614e64b2b336e62a240f443ea6.tar.gz minetest-cf4045ff0f7c96614e64b2b336e62a240f443ea6.tar.bz2 minetest-cf4045ff0f7c96614e64b2b336e62a240f443ea6.zip |
Use proper CMakeLists.txt for network and client directories
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 16 | ||||
-rw-r--r-- | src/client/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/network/CMakeLists.txt | 15 |
3 files changed, 28 insertions, 7 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ce1cc30bf..3bf803ea0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -352,6 +352,7 @@ add_custom_target(GenerateVersion WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") add_subdirectory(jthread) +add_subdirectory(network) add_subdirectory(script) add_subdirectory(util) @@ -431,10 +432,7 @@ set(common_SRCS version.cpp voxel.cpp voxelalgorithms.cpp - network/connection.cpp - network/networkpacket.cpp - network/packethandlers/server.cpp - network/serveropcodes.cpp + ${common_network_SRCS} ${JTHREAD_SRCS} ${common_SCRIPT_SRCS} ${UTIL_SRCS} @@ -461,9 +459,16 @@ if(WIN32) endif() # Client sources + +if (BUILD_CLIENT) + add_subdirectory(client) +endif(BUILD_CLIENT) + set(minetest_SRCS ${common_SRCS} ${sound_SRCS} + ${client_SRCS} + ${client_network_SRCS} camera.cpp chat.cpp client.cpp @@ -498,9 +503,6 @@ set(minetest_SRCS sky.cpp tile.cpp wieldmesh.cpp - client/clientlauncher.cpp - network/clientopcodes.cpp - network/packethandlers/client.cpp ${minetest_SCRIPT_SRCS} ) list(SORT minetest_SRCS) diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt new file mode 100644 index 000000000..8cd981aca --- /dev/null +++ b/src/client/CMakeLists.txt @@ -0,0 +1,4 @@ +set(client_SRCS + ${CMAKE_CURRENT_SOURCE_DIR}/clientlauncher.cpp + PARENT_SCOPE +)
\ No newline at end of file diff --git a/src/network/CMakeLists.txt b/src/network/CMakeLists.txt new file mode 100644 index 000000000..3162469c8 --- /dev/null +++ b/src/network/CMakeLists.txt @@ -0,0 +1,15 @@ +set(common_network_SRCS + ${CMAKE_CURRENT_SOURCE_DIR}/connection.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/networkpacket.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/packethandlers/server.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/serveropcodes.cpp + PARENT_SCOPE +) + +if (BUILD_CLIENT) + set(client_network_SRCS + ${CMAKE_CURRENT_SOURCE_DIR}/clientopcodes.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/packethandlers/client.cpp + PARENT_SCOPE + ) +endif(BUILD_CLIENT)
\ No newline at end of file |