meson.build 1.9 KB

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