meson.build 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. project('cubes plus plus', 'cpp')
  2. src_common = [
  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. ]
  10. src_server = ['server/Main.cpp',
  11. 'server/Game.cpp',
  12. 'server/commands/Commands.cpp',
  13. 'server/commands/DefaultCommands.cpp',
  14. 'server/commands/SnuviCommands.cpp',
  15. 'server/world/WorldGenerator.cpp',
  16. 'server/snuviscript/Snuvi.cpp',
  17. 'server/GameServer.cpp',
  18. ]
  19. src_client = ['client/Main.cpp',
  20. 'client/rendering/Framebuffers.cpp',
  21. 'client/rendering/Engine.cpp',
  22. 'client/rendering/Shaders.cpp',
  23. 'client/rendering/Mesh.cpp',
  24. 'client/Game.cpp',
  25. 'client/rendering/ShaderMatrix.cpp',
  26. 'client/rendering/NoiseTexture.cpp',
  27. 'client/input/Controller.cpp',
  28. 'client/rendering/RenderSettings.cpp',
  29. 'client/rendering/Renderer.cpp',
  30. 'client/rendering/renderer/WorldRenderer.cpp',
  31. 'client/rendering/Vertex.cpp',
  32. 'client/rendering/Triangle.cpp',
  33. 'client/gui/BaseGUI.cpp',
  34. 'client/gui/StartGUI.cpp'
  35. ]
  36. sources_test = ['tests/Main.cpp']
  37. args = ['-Wall', '-Wextra', '-pedantic', '-Werror']
  38. liblonelytiger_proj = subproject('lonely-tiger')
  39. liblonelytiger_dep = liblonelytiger_proj.get_variable('liblonelytiger_dep')
  40. libgamingcore_proj = subproject('gaming-core')
  41. libgamingcore_dep = libgamingcore_proj.get_variable('libgamingcore_dep')
  42. common = static_library('common',
  43. sources: src_common,
  44. dependencies: [libgamingcore_dep],
  45. c_args: args)
  46. common_dep = declare_dependency(
  47. link_with: common,
  48. include_directories: ['subprojects/gaming-core'])
  49. executable('game_server',
  50. sources: src_server,
  51. dependencies: [liblonelytiger_dep, common_dep],
  52. cpp_args: args)
  53. executable('game_tests',
  54. sources: sources_test,
  55. cpp_args: args)
  56. executable('game_client',
  57. sources: src_client,
  58. dependencies : common_dep,
  59. cpp_args: args)