meson.build 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. sources = files(
  2. 'Core/HttpContext.vala',
  3. 'Core/HttpValues.vala',
  4. 'Core/HttpResult.vala',
  5. 'Core/AsyncInput.vala',
  6. 'Core/AsyncOutput.vala',
  7. 'Core/Pipeline.vala',
  8. 'Core/WebApplication.vala',
  9. 'Core/WebConfig.vala',
  10. 'Core/WebConfigLoader.vala',
  11. 'Core/WebConfigSection.vala',
  12. 'Core/WebConfigError.vala',
  13. 'Core/ConfigMerger.vala',
  14. 'Core/ServerLimits.vala',
  15. 'Data/FormDataParser.vala',
  16. 'Components/EndpointRouter.vala',
  17. 'Components/SecurityHeadersComponent.vala',
  18. 'Components/Compressor.vala',
  19. 'Components/GzipCompressor.vala',
  20. 'Components/BrotliCompressor.vala',
  21. 'Components/ZstdCompressor.vala',
  22. 'Endpoints/Endpoint.vala',
  23. 'Endpoints/FilesystemResource.vala',
  24. 'Endpoints/FastResource.vala',
  25. 'Endpoints/SseEndpoint.vala',
  26. 'Server/Server.vala',
  27. 'Server/SocketMonitor.vala',
  28. 'Server/RequestContext.vala',
  29. 'Server/ResponseContext.vala',
  30. 'Server/ServerInput.vala',
  31. 'Server/ServerOutput.vala',
  32. 'Markup/MarkupDocument.vala',
  33. 'Markup/MarkupNode.vala',
  34. 'Markup/MarkupError.vala',
  35. 'Markup/MarkupTemplate.vala',
  36. 'Markup/XPathResultEnumerable.vala',
  37. 'Markup/ChildNodesEnumerable.vala',
  38. )
  39. # The API version rides every artifact name (libastralis-0.1.so,
  40. # astralis-0.1.vapi, ...); the project version is the release version and
  41. # only reaches the pkg-config Version: field (usm checks it against the
  42. # manifest version).
  43. api_version = '0.1'
  44. release_version = meson.project_version()
  45. libastralis = shared_library('astralis-@0@'.format(api_version),
  46. sources,
  47. dependencies: [glib_dep, gobject_dep, mhd_dep, gio_dep, gio_unix_dep, invercargill_dep, invercargill_json_dep, json_glib_dep, zlib_dep, brotli_dep, zstd_dep, inversion_dep, libxml_dep],
  48. install: true,
  49. vala_gir: 'astralis-@0@.gir'.format(api_version),
  50. install_dir: [true, true, true, true]
  51. )
  52. pkg = import('pkgconfig')
  53. pkg.generate(libastralis,
  54. version : release_version,
  55. name : 'astralis-@0@'.format(api_version))
  56. g_ir_compiler = find_program('g-ir-compiler')
  57. custom_target('astralis typelib', command: [g_ir_compiler, '--shared-library=libastralis-@0@.so'.format(api_version), '--output', '@OUTPUT@', meson.current_build_dir() / 'astralis-@0@.gir'.format(api_version)],
  58. output: 'libastralis-@0@.typelib'.format(api_version),
  59. depends: libastralis,
  60. install: true,
  61. install_dir: get_option('libdir') / 'girepository-1.0')
  62. astralis_dep = declare_dependency(
  63. link_with: libastralis,
  64. include_directories: include_directories('.'),
  65. dependencies: [glib_dep, gobject_dep, invercargill_dep, invercargill_json_dep, mhd_dep, json_glib_dep, brotli_dep, zstd_dep, inversion_dep, libxml_dep] # Users of astralis need glib, gobject, invercargill, mhd, brotli, and zstd
  66. )