meson.build 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. project('cubes plus plus', 'cpp')
  2. src_common = [
  3. 'common/Block.cpp',
  4. 'common/BlockStorage.cpp',
  5. 'common/Box.cpp',
  6. 'common/entities/Entity.cpp',
  7. 'common/network/toserver/PlayerUpdatePacket.cpp',
  8. 'common/network/toclient/EntityUpdatePacket.cpp',
  9. ]
  10. src_server = ['server/Main.cpp',
  11. 'server/Game.cpp',
  12. 'server/World.cpp',
  13. 'server/commands/Commands.cpp',
  14. 'server/commands/DefaultCommands.cpp',
  15. 'server/commands/SnuviCommands.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/GameClient.cpp',
  28. 'client/World.cpp',
  29. 'client/rendering/ShaderMatrix.cpp',
  30. 'client/rendering/NoiseTexture.cpp',
  31. 'client/input/Controller.cpp',
  32. 'client/rendering/Renderer.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. compiler = meson.get_compiler('cpp')
  41. args = compiler.get_supported_arguments(['-Wall', '-Wextra', '-pedantic', '-Werror', '-DLOG_LEVEL=4'])
  42. libgamingcore_proj = subproject('gaming-core')
  43. libgamingcore_dep = libgamingcore_proj.get_variable('libgamingcore_dep')
  44. common = static_library('common',
  45. sources: src_common,
  46. dependencies: [libgamingcore_dep],
  47. cpp_args: args)
  48. common_dep = declare_dependency(
  49. link_with: common,
  50. include_directories: libgamingcore_proj.get_variable('libgamingcore_include'))
  51. if host_machine.system() == 'linux'
  52. liblonelytiger_proj = subproject('lonely-tiger')
  53. liblonelytiger_dep = liblonelytiger_proj.get_variable('liblonelytiger_dep')
  54. executable('game_server',
  55. sources: src_server,
  56. dependencies: [liblonelytiger_dep, common_dep],
  57. cpp_args: args)
  58. endif
  59. executable('game_tests',
  60. sources: sources_test,
  61. cpp_args: args)
  62. executable('game_client',
  63. sources: src_client,
  64. dependencies : common_dep,
  65. cpp_args: args)