project('cubes plus plus', 'cpp') # 'common/world/Chunk.cpp', 'common/world/World.cpp', 'common/utils/Face.cpp' sourcesCommon = ['common/network/Packet.cpp', 'common/block/BlockBuilder.cpp', 'common/block/Block.cpp', 'common/block/BlockRegistry.cpp', 'common/utils/HashedString.cpp', 'common/utils/String.cpp', 'common/utils/SplitString.cpp', 'common/utils/Random.cpp', 'common/world/World.cpp', 'common/math/Vector.cpp'] sourcesServer = ['server/Main.cpp', 'server/network/Server.cpp', 'server/network/Client.cpp', 'server/GameServer.cpp', 'server/commands/ServerCommands.cpp', 'server/commands/CommandManager.cpp', 'server/commands/ConsoleEditor.cpp', 'server/Clock.cpp'] 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/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', 'client/rendering/NormalTexture.cpp', 'client/rendering/Vertex.cpp', 'client/rendering/Triangle.cpp', 'client/rendering/Lines.cpp', 'common/utils/KDTree.cpp'] sourcesTest = ['tests/Main.cpp', 'common/utils/String.cpp', 'common/utils/SplitString.cpp', 'common/utils/HashedString.cpp', 'common/utils/Random.cpp'] c_compiler = meson.get_compiler('cpp') readline = c_compiler.find_library('readline', required: true) threadDep = dependency('threads') glewDep = dependency('glew') glfwDep = dependency('glfw3') pngDep = dependency('libpng') executable('game_server', sources: sourcesCommon + sourcesServer, dependencies : [threadDep, readline], cpp_args: ['-Wall', '-Wextra', '-pedantic', '-Werror']) executable('game_tests', sources: sourcesTest, cpp_args: ['-Wall', '-Wextra', '-pedantic', '-Werror']) executable('game_client', sources: sourcesCommon + sourcesClient, dependencies : [threadDep, glewDep, glfwDep, pngDep], cpp_args: ['-Wall', '-Wextra', '-pedantic', '-Werror'])