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. '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/rendering/Shader.cpp',
  30. 'gaming-core/rendering/Texture.cpp',
  31. 'gaming-core/rendering/TextureFormat.cpp',
  32. 'gaming-core/rendering/VertexBuffer.cpp',
  33. 'gaming-core/rendering/Attributes.cpp',
  34. 'gaming-core/rendering/Window.cpp',
  35. 'gaming-core/rendering/WindowOptions.cpp',
  36. 'gaming-core/rendering/FileTexture.cpp',
  37. 'gaming-core/images/PNGReader.cpp',
  38. 'gaming-core/utils/Buffer.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)