meson.build 2.7 KB

123456789101112131415161718192021222324252627282930313233343536
  1. project('cubes plus plus', 'cpp')
  2. # 'common/world/Chunk.cpp', 'common/world/World.cpp', 'common/utils/Face.cpp'
  3. sourcesCommon = ['common/block/BlockBuilder.cpp', 'common/block/Block.cpp', 'common/block/BlockRegistry.cpp', 'common/utils/HashedString.cpp', 'common/stream/Stream.cpp', 'common/utils/DataVector.cpp', 'common/utils/String.cpp', 'common/utils/SplitString.cpp', 'common/utils/Random.cpp', 'common/world/World.cpp']
  4. sourcesServer = ['server/Main.cpp', 'server/network/Server.cpp', 'server/GameServer.cpp', 'server/commands/ServerCommands.cpp', 'server/commands/CommandManager.cpp', 'server/network/Socket.cpp', 'server/commands/CommandEditor.cpp', 'server/Clock.cpp']
  5. sourcesClient = ['client/Main.cpp', 'client/rendering/WindowSize.cpp', 'client/math/Frustum.cpp', 'client/rendering/Framebuffers.cpp', 'client/rendering/wrapper/GLFWWrapper.cpp', 'client/rendering/wrapper/Window.cpp', 'client/rendering/Engine.cpp', 'client/input/Keys.cpp', 'client/rendering/wrapper/Shader.cpp', 'client/rendering/Shaders.cpp', 'client/utils/Utils.cpp', 'client/rendering/Mesh.cpp', 'client/math/Matrix.cpp', 'client/math/MatrixStack.cpp', 'client/math/Vector.cpp', 'client/math/Quaternion.cpp', 'client/math/Plane.cpp', 'client/Game.cpp', 'client/input/MouseButtons.cpp', 'client/rendering/FileTexture.cpp', 'client/rendering/FontRenderer.cpp', 'client/rendering/wrapper/Framebuffer.cpp', 'client/rendering/NoiseTexture.cpp', 'client/utils/Clock.cpp', 'client/input/Control.cpp', 'client/rendering/RenderSettings.cpp', 'client/rendering/wrapper/VertexBuffer.cpp', 'client/rendering/wrapper/StreamBuffer.cpp', 'client/rendering/wrapper/Texture.cpp', 'client/utils/PNGReader.cpp', 'client/rendering/wrapper/GLWrapper.cpp', 'client/rendering/Renderer.cpp', 'client/rendering/renderer/WorldRenderer.cpp']
  6. sourcesTest = ['tests/Main.cpp', 'common/utils/String.cpp', 'common/utils/SplitString.cpp', 'client/math/Matrix.cpp', 'client/math/Vector.cpp', 'common/utils/HashedString.cpp', 'common/utils/Random.cpp']
  7. c_compiler = meson.get_compiler('cpp')
  8. readline = c_compiler.find_library('readline', required: true)
  9. threadDep = dependency('threads')
  10. glewDep = dependency('glew')
  11. glfwDep = dependency('glfw3')
  12. pngDep = dependency('libpng')
  13. executable('game_server',
  14. sources: sourcesCommon + sourcesServer,
  15. dependencies : [threadDep, readline],
  16. cpp_args: ['-Wall', '-Wextra', '-pedantic', '-Werror'])
  17. executable('game_tests',
  18. sources: sourcesTest,
  19. cpp_args: ['-Wall', '-Wextra', '-pedantic', '-Werror'])
  20. executable('game_client',
  21. sources: sourcesCommon + sourcesClient,
  22. dependencies : [threadDep, glewDep, glfwDep, pngDep],
  23. cpp_args: ['-Wall', '-Wextra', '-pedantic', '-Werror'])