meson.build 2.6 KB

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