meson.build 2.1 KB

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