meson.build 2.8 KB

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