meson.build 1.6 KB

123456789101112131415161718192021222324252627282930313233
  1. project('cubes plus plus', 'cpp')
  2. sourcesCommon = ['common/block/BlockRegistry.cpp', 'common/block/Block.cpp', 'common/stream/Stream.cpp', 'common/world/Chunk.cpp', 'common/world/World.cpp', 'common/utils/Face.cpp', 'common/utils/DataVector.cpp']
  3. sourcesServer = ['server/GameServer.cpp', 'server/commands/CommandUtils.cpp', 'server/commands/ServerCommands.cpp', 'server/commands/CommandManager.cpp', 'server/network/Server.cpp', 'server/Main.cpp']
  4. sourcesClient = ['client/Main.cpp', 'client/GameClient.cpp', 'client/input/Keys.cpp', 'client/rendering/Shader.cpp', 'client/Utils.cpp', 'client/rendering/Mesh.cpp', 'client/math/Matrix.cpp', 'client/math/MatrixStack.cpp', 'client/math/Vector.cpp', 'client/math/Camera.cpp', 'client/math/Plane.cpp', 'client/Game.cpp', 'client/input/MouseButtons.cpp', 'client/rendering/Texture.cpp', 'client/rendering/FontRenderer.cpp', 'client/rendering/Framebuffer.cpp', 'client/rendering/NoiseTexture.cpp']
  5. sourcesTest = ['tests/Main.cpp', 'server/commands/CommandUtils.cpp']
  6. c_compiler = meson.get_compiler('cpp')
  7. readline = c_compiler.find_library('readline', required: true)
  8. threadDep = dependency('threads')
  9. glewDep = dependency('glew')
  10. glfwDep = dependency('glfw3')
  11. pngDep = dependency('libpng')
  12. executable('game_server',
  13. sources: sourcesCommon + sourcesServer,
  14. dependencies : [threadDep, readline],
  15. cpp_args: ['-Wall', '-Wextra', '-pedantic', '-Werror'])
  16. #executable('game_tests',
  17. # sources: sourcesTest)
  18. executable('game_client',
  19. sources: sourcesCommon + sourcesClient,
  20. dependencies : [threadDep, glewDep, glfwDep, pngDep],
  21. cpp_args: ['-Wall', '-Wextra', '-pedantic', '-Werror'])