File tree 3 files changed +28
-7
lines changed
3 files changed +28
-7
lines changed Original file line number Diff line number Diff line change @@ -352,6 +352,7 @@ add_custom_target(GenerateVersion
352
352
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR} " )
353
353
354
354
add_subdirectory (jthread)
355
+ add_subdirectory (network)
355
356
add_subdirectory (script)
356
357
add_subdirectory (util)
357
358
@@ -431,10 +432,7 @@ set(common_SRCS
431
432
version .cpp
432
433
voxel.cpp
433
434
voxelalgorithms.cpp
434
- network/connection.cpp
435
- network/networkpacket.cpp
436
- network/packethandlers/server.cpp
437
- network/serveropcodes.cpp
435
+ ${common_network_SRCS}
438
436
${JTHREAD_SRCS}
439
437
${common_SCRIPT_SRCS}
440
438
${UTIL_SRCS}
@@ -461,9 +459,16 @@ if(WIN32)
461
459
endif ()
462
460
463
461
# Client sources
462
+
463
+ if (BUILD_CLIENT)
464
+ add_subdirectory (client)
465
+ endif (BUILD_CLIENT)
466
+
464
467
set (minetest_SRCS
465
468
${common_SRCS}
466
469
${sound_SRCS}
470
+ ${client_SRCS}
471
+ ${client_network_SRCS}
467
472
camera.cpp
468
473
chat.cpp
469
474
client.cpp
@@ -498,9 +503,6 @@ set(minetest_SRCS
498
503
sky.cpp
499
504
tile.cpp
500
505
wieldmesh.cpp
501
- client/clientlauncher.cpp
502
- network/clientopcodes.cpp
503
- network/packethandlers/client.cpp
504
506
${minetest_SCRIPT_SRCS}
505
507
)
506
508
list (SORT minetest_SRCS)
Original file line number Diff line number Diff line change
1
+ set (client_SRCS
2
+ ${CMAKE_CURRENT_SOURCE_DIR} /clientlauncher.cpp
3
+ PARENT_SCOPE
4
+ )
Original file line number Diff line number Diff line change
1
+ set (common_network_SRCS
2
+ ${CMAKE_CURRENT_SOURCE_DIR} /connection.cpp
3
+ ${CMAKE_CURRENT_SOURCE_DIR} /networkpacket.cpp
4
+ ${CMAKE_CURRENT_SOURCE_DIR} /packethandlers/server.cpp
5
+ ${CMAKE_CURRENT_SOURCE_DIR} /serveropcodes.cpp
6
+ PARENT_SCOPE
7
+ )
8
+
9
+ if (BUILD_CLIENT)
10
+ set (client_network_SRCS
11
+ ${CMAKE_CURRENT_SOURCE_DIR} /clientopcodes.cpp
12
+ ${CMAKE_CURRENT_SOURCE_DIR} /packethandlers/client.cpp
13
+ PARENT_SCOPE
14
+ )
15
+ endif (BUILD_CLIENT)
You can’t perform that action at this time.
0 commit comments