meson.build 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. project('cubes plus plus', 'cpp')
  2. sourcesCommon = [
  3. 'common/network/Packet.cpp',
  4. 'common/block/BlockBuilder.cpp',
  5. 'common/block/Block.cpp',
  6. 'common/block/BlockRegistry.cpp',
  7. 'common/utils/HashedString.cpp',
  8. 'common/utils/String.cpp',
  9. 'common/utils/SplitString.cpp',
  10. 'common/utils/Random.cpp',
  11. 'common/world/World.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/ServerCommands.cpp',
  18. 'server/commands/CommandManager.cpp',
  19. 'server/commands/ConsoleEditor.cpp',
  20. 'server/Clock.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. 'client/rendering/Framebuffers.cpp',
  26. 'client/rendering/wrapper/GLFWWrapper.cpp',
  27. 'client/rendering/wrapper/Window.cpp',
  28. 'client/rendering/Engine.cpp',
  29. 'client/input/Keys.cpp',
  30. 'client/rendering/wrapper/Shader.cpp',
  31. 'client/rendering/Shaders.cpp',
  32. 'client/rendering/Mesh.cpp',
  33. 'gaming-core/math/Matrix.cpp',
  34. 'gaming-core/math/Quaternion.cpp',
  35. 'client/Game.cpp',
  36. 'client/input/MouseButtons.cpp',
  37. 'client/rendering/FileTexture.cpp',
  38. 'client/rendering/FontRenderer.cpp',
  39. 'client/rendering/wrapper/Framebuffer.cpp',
  40. 'client/rendering/NoiseTexture.cpp',
  41. 'client/utils/Clock.cpp',
  42. 'client/input/Control.cpp',
  43. 'client/rendering/RenderSettings.cpp',
  44. 'client/rendering/wrapper/VertexBuffer.cpp',
  45. 'client/rendering/wrapper/StreamBuffer.cpp',
  46. 'client/rendering/wrapper/Texture.cpp',
  47. 'client/utils/PNGReader.cpp',
  48. 'client/rendering/wrapper/GLWrapper.cpp',
  49. 'client/rendering/Renderer.cpp',
  50. 'client/rendering/renderer/WorldRenderer.cpp',
  51. 'client/rendering/NormalTexture.cpp',
  52. 'client/rendering/Vertex.cpp',
  53. 'client/rendering/Triangle.cpp',
  54. 'client/rendering/Lines.cpp']
  55. sourcesTest = ['tests/Main.cpp',
  56. 'common/utils/String.cpp',
  57. 'common/utils/SplitString.cpp',
  58. 'common/utils/HashedString.cpp',
  59. 'common/utils/Random.cpp']
  60. c_compiler = meson.get_compiler('cpp')
  61. readline = c_compiler.find_library('readline', required: true)
  62. threadDep = dependency('threads')
  63. glewDep = dependency('glew')
  64. glfwDep = dependency('glfw3')
  65. pngDep = dependency('libpng')
  66. executable('game_server',
  67. sources: sourcesCommon + sourcesServer,
  68. dependencies : [threadDep, readline],
  69. include_directories : include_directories('gaming-core'),
  70. cpp_args: ['-Wall', '-Wextra', '-pedantic', '-Werror'])
  71. executable('game_tests',
  72. sources: sourcesTest,
  73. include_directories : include_directories('gaming-core'),
  74. cpp_args: ['-Wall', '-Wextra', '-pedantic', '-Werror'])
  75. executable('game_client',
  76. sources: sourcesCommon + sourcesClient,
  77. dependencies : [threadDep, glewDep, glfwDep, pngDep],
  78. include_directories : include_directories('gaming-core'),
  79. cpp_args: ['-Wall', '-Wextra', '-pedantic', '-Werror'])