WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
add_subdirectory(jthread)
+add_subdirectory(network)
add_subdirectory(script)
add_subdirectory(util)
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}
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
sky.cpp
tile.cpp
wieldmesh.cpp
- client/clientlauncher.cpp
- network/clientopcodes.cpp
- network/packethandlers/client.cpp
${minetest_SCRIPT_SRCS}
)
list(SORT minetest_SRCS)
--- /dev/null
+set(client_SRCS
+ ${CMAKE_CURRENT_SOURCE_DIR}/clientlauncher.cpp
+ PARENT_SCOPE
+)
\ No newline at end of file
--- /dev/null
+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