meson.build 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. project('gamingcore', 'cpp')
  2. src = [
  3. 'images/PNGReader.cpp',
  4. 'input/Button.cpp',
  5. 'input/Buttons.cpp',
  6. 'input/TextInput.cpp',
  7. 'math/Frustum.cpp',
  8. 'math/Matrix.cpp',
  9. 'math/Plane.cpp',
  10. 'math/Quaternion.cpp',
  11. 'math/Vector.cpp',
  12. 'network/Client.cpp',
  13. 'network/ENet.cpp',
  14. 'network/Packet.cpp',
  15. 'network/Server.cpp',
  16. 'rendering/Attributes.cpp',
  17. 'rendering/FileTexture.cpp',
  18. 'rendering/Shader.cpp',
  19. 'rendering/Texture.cpp',
  20. 'rendering/TextureFormat.cpp',
  21. 'rendering/VertexBuffer.cpp',
  22. 'rendering/Window.cpp',
  23. 'rendering/WindowOptions.cpp',
  24. 'utils/BitArray.cpp',
  25. 'utils/Buffer.cpp',
  26. 'utils/Clock.cpp',
  27. 'utils/Error.cpp',
  28. 'utils/Logger.cpp',
  29. 'utils/Random.cpp',
  30. 'utils/Size.cpp',
  31. 'wrapper/GL.cpp',
  32. ]
  33. src_tests = [
  34. 'Main.cpp',
  35. 'tests/ArrayListTests.cpp',
  36. 'tests/ArrayTests.cpp',
  37. 'tests/BitArrayTests.cpp',
  38. 'tests/BufferTests.cpp',
  39. 'tests/ClockTests.cpp',
  40. 'tests/ColorTests.cpp',
  41. 'tests/FrustumTests.cpp',
  42. 'tests/HashMapTests.cpp',
  43. 'tests/ListTests.cpp',
  44. 'tests/MatrixStackTests.cpp',
  45. 'tests/MatrixTests.cpp',
  46. 'tests/NetworkTests.cpp',
  47. 'tests/PNGReaderTests.cpp',
  48. 'tests/PlaneTests.cpp',
  49. 'tests/QuaternionTests.cpp',
  50. 'tests/RandomTests.cpp',
  51. 'tests/RingBufferTests.cpp',
  52. 'tests/SplitStringTests.cpp',
  53. 'tests/StackTests.cpp',
  54. 'tests/StringBufferTests.cpp',
  55. 'tests/Test.cpp',
  56. 'tests/TypedBufferTests.cpp',
  57. 'tests/UniquePointerTests.cpp',
  58. 'tests/UtilsTests.cpp',
  59. 'tests/VectorTests.cpp',
  60. ]
  61. thread_dep = dependency('threads')
  62. glew_dep = dependency('glew')
  63. glfw_dep = dependency('glfw3')
  64. png_dep = dependency('libpng')
  65. args = ['-Wall', '-Wextra', '-pedantic', '-Werror']
  66. inc = include_directories('.')
  67. libgamingcore = static_library('gamingcore',
  68. sources: src,
  69. include_directories : inc,
  70. dependencies : [thread_dep, glew_dep, glfw_dep, png_dep],
  71. cpp_args: args)
  72. libgamingcore_dep = declare_dependency(include_directories : inc, link_with : libgamingcore)
  73. executable('tests',
  74. sources: src_tests,
  75. dependencies : libgamingcore_dep,
  76. cpp_args: args + ['-DLOG_LEVEL=4'])