meson.build 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. 'server/entities/ServerPlayer.cpp',
  19. 'server/packets/WorldPackets.cpp',
  20. ]
  21. src_client = ['client/Main.cpp',
  22. 'client/rendering/Framebuffers.cpp',
  23. 'client/rendering/Engine.cpp',
  24. 'client/rendering/Shaders.cpp',
  25. 'client/rendering/Mesh.cpp',
  26. 'client/Game.cpp',
  27. 'client/rendering/ShaderMatrix.cpp',
  28. 'client/rendering/NoiseTexture.cpp',
  29. 'client/input/Controller.cpp',
  30. 'client/rendering/RenderSettings.cpp',
  31. 'client/rendering/Renderer.cpp',
  32. 'client/rendering/renderer/WorldRenderer.cpp',
  33. 'client/rendering/Vertex.cpp',
  34. 'client/rendering/Triangle.cpp',
  35. 'client/gui/BaseGUI.cpp',
  36. 'client/gui/StartGUI.cpp',
  37. 'client/packets/WorldPackets.cpp',
  38. ]
  39. sources_test = ['tests/Main.cpp']
  40. args = ['-Wall', '-Wextra', '-pedantic', '-Werror', '-DLOG_LEVEL=4']
  41. liblonelytiger_proj = subproject('lonely-tiger')
  42. liblonelytiger_dep = liblonelytiger_proj.get_variable('liblonelytiger_dep')
  43. libgamingcore_proj = subproject('gaming-core')
  44. libgamingcore_dep = libgamingcore_proj.get_variable('libgamingcore_dep')
  45. common = static_library('common',
  46. sources: src_common,
  47. dependencies: [libgamingcore_dep],
  48. c_args: args)
  49. common_dep = declare_dependency(
  50. link_with: common,
  51. include_directories: ['subprojects/gaming-core'])
  52. executable('game_server',
  53. sources: src_server,
  54. dependencies: [liblonelytiger_dep, common_dep],
  55. cpp_args: args)
  56. executable('game_tests',
  57. sources: sources_test,
  58. cpp_args: args)
  59. executable('game_client',
  60. sources: src_client,
  61. dependencies : common_dep,
  62. cpp_args: args)