meson.build 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. project('cubes plus plus', 'cpp')
  2. sourcesCommon = [
  3. 'common/network/Packet.cpp',
  4. 'common/block/Block.cpp',
  5. 'common/block/BlockRegistry.cpp',
  6. 'common/world/BlockMap.cpp',
  7. 'common/world/BlockStorage.cpp',
  8. 'common/world/World.cpp',
  9. 'common/world/HighMap.cpp',
  10. 'gaming-core/utils/Random.cpp',
  11. 'gaming-core/utils/Clock.cpp',
  12. 'gaming-core/utils/BitArray.cpp',
  13. 'gaming-core/math/Vector.cpp']
  14. sourcesServer = ['server/Main.cpp',
  15. 'server/network/Server.cpp',
  16. 'server/network/Client.cpp',
  17. 'server/GameServer.cpp',
  18. 'server/commands/ServerState.cpp',
  19. 'server/commands/CommandManager.cpp']
  20. sourcesClient = ['client/Main.cpp',
  21. 'gaming-core/utils/Size.cpp',
  22. 'gaming-core/math/Frustum.cpp',
  23. 'gaming-core/math/Plane.cpp',
  24. 'gaming-core/math/Matrix.cpp',
  25. 'gaming-core/math/Quaternion.cpp',
  26. 'gaming-core/wrapper/GLFW.cpp',
  27. 'gaming-core/wrapper/GL.cpp',
  28. 'gaming-core/wrapper/GLEW.cpp',
  29. 'gaming-core/wrapper/Shader.cpp',
  30. 'gaming-core/wrapper/Texture.cpp',
  31. 'gaming-core/wrapper/TextureFormat.cpp',
  32. 'gaming-core/wrapper/VertexBuffer.cpp',
  33. 'gaming-core/wrapper/Attributes.cpp',
  34. 'gaming-core/images/PNGReader.cpp',
  35. 'gaming-core/rendering/FileTexture.cpp',
  36. 'gaming-core/memory/StackAllocator.cpp',
  37. 'gaming-core/utils/Buffer.cpp',
  38. 'gaming-core/wrapper/Window.cpp',
  39. 'gaming-core/wrapper/WindowOptions.cpp',
  40. 'gaming-core/input/Button.cpp',
  41. 'gaming-core/input/Buttons.cpp',
  42. 'client/rendering/Framebuffers.cpp',
  43. 'client/rendering/Engine.cpp',
  44. 'client/rendering/Shaders.cpp',
  45. 'client/rendering/Mesh.cpp',
  46. 'client/Game.cpp',
  47. 'client/rendering/FontRenderer.cpp',
  48. 'client/rendering/NoiseTexture.cpp',
  49. 'client/input/Controller.cpp',
  50. 'client/rendering/RenderSettings.cpp',
  51. 'client/rendering/Renderer.cpp',
  52. 'client/rendering/renderer/WorldRenderer.cpp',
  53. 'client/rendering/Vertex.cpp',
  54. 'client/rendering/Triangle.cpp']
  55. sourcesTest = ['tests/Main.cpp']
  56. threadDep = dependency('threads')
  57. glewDep = dependency('glew')
  58. glfwDep = dependency('glfw3')
  59. pngDep = dependency('libpng')
  60. args = ['-Wall', '-Wextra', '-pedantic', '-Werror']
  61. executable('game_server',
  62. sources: sourcesCommon + sourcesServer,
  63. dependencies : [threadDep],
  64. include_directories : include_directories('gaming-core'),
  65. cpp_args: args)
  66. executable('game_tests',
  67. sources: sourcesTest,
  68. include_directories : include_directories('gaming-core'),
  69. cpp_args: args)
  70. executable('game_client',
  71. sources: sourcesCommon + sourcesClient,
  72. dependencies : [threadDep, glewDep, glfwDep, pngDep],
  73. include_directories : include_directories('gaming-core'),
  74. cpp_args: args)