|
@@ -1,6 +1,6 @@
|
|
|
project('cubes plus plus', 'cpp')
|
|
|
|
|
|
-sourcesCommon = [
|
|
|
+sources_common = [
|
|
|
'common/block/Block.cpp',
|
|
|
'common/block/BlockRegistry.cpp',
|
|
|
'common/world/BlockMap.cpp',
|
|
@@ -12,16 +12,18 @@ sourcesCommon = [
|
|
|
'gaming-core/utils/BitArray.cpp',
|
|
|
'gaming-core/math/Vector.cpp',
|
|
|
'gaming-core/network/Packet.cpp',
|
|
|
- 'gaming-core/network/ENet.cpp']
|
|
|
+ 'gaming-core/network/ENet.cpp'
|
|
|
+]
|
|
|
|
|
|
-sourcesServer = ['server/Main.cpp',
|
|
|
+sources_server = ['server/Main.cpp',
|
|
|
'server/GameServer.cpp',
|
|
|
'server/commands/ServerState.cpp',
|
|
|
'server/commands/CommandManager.cpp',
|
|
|
'server/world/WorldGenerator.cpp',
|
|
|
- 'gaming-core/network/Server.cpp',]
|
|
|
+ 'gaming-core/network/Server.cpp'
|
|
|
+]
|
|
|
|
|
|
-sourcesClient = ['client/Main.cpp',
|
|
|
+sources_client = ['client/Main.cpp',
|
|
|
'gaming-core/utils/Size.cpp',
|
|
|
'gaming-core/math/Frustum.cpp',
|
|
|
'gaming-core/math/Plane.cpp',
|
|
@@ -57,30 +59,34 @@ sourcesClient = ['client/Main.cpp',
|
|
|
'client/rendering/Vertex.cpp',
|
|
|
'client/rendering/Triangle.cpp',
|
|
|
'client/gui/BaseGUI.cpp',
|
|
|
- 'client/gui/StartGUI.cpp']
|
|
|
+ 'client/gui/StartGUI.cpp'
|
|
|
+]
|
|
|
|
|
|
-sourcesTest = ['tests/Main.cpp']
|
|
|
+sources_test = ['tests/Main.cpp']
|
|
|
|
|
|
-threadDep = dependency('threads')
|
|
|
-glewDep = dependency('glew')
|
|
|
-glfwDep = dependency('glfw3')
|
|
|
-pngDep = dependency('libpng')
|
|
|
+thread_dep = dependency('threads')
|
|
|
+glew_dep = dependency('glew')
|
|
|
+glfw_dep = dependency('glfw3')
|
|
|
+png_dep = dependency('libpng')
|
|
|
|
|
|
args = ['-Wall', '-Wextra', '-pedantic', '-Werror']
|
|
|
|
|
|
+liblonelytiger_proj = subproject('lonely-tiger')
|
|
|
+liblonelytiger_dep = liblonelytiger_proj.get_variable('liblonelytiger_dep')
|
|
|
+
|
|
|
executable('game_server',
|
|
|
- sources: sourcesCommon + sourcesServer,
|
|
|
- dependencies : [threadDep],
|
|
|
+ sources: sources_common + sources_server,
|
|
|
+ dependencies : [thread_dep, liblonelytiger_dep],
|
|
|
include_directories : include_directories('gaming-core'),
|
|
|
cpp_args: args)
|
|
|
|
|
|
executable('game_tests',
|
|
|
- sources: sourcesTest,
|
|
|
+ sources: sources_test,
|
|
|
include_directories : include_directories('gaming-core'),
|
|
|
cpp_args: args)
|
|
|
|
|
|
executable('game_client',
|
|
|
- sources: sourcesCommon + sourcesClient,
|
|
|
- dependencies : [threadDep, glewDep, glfwDep, pngDep],
|
|
|
+ sources: sources_common + sources_client,
|
|
|
+ dependencies : [thread_dep, glew_dep, glfw_dep, png_dep],
|
|
|
include_directories : include_directories('gaming-core'),
|
|
|
cpp_args: args)
|