meson.build 753 B

123456789101112131415161718192021222324252627282930313233343536
  1. project('parson', 'c',
  2. version : '1.5.3',
  3. license : 'MIT',
  4. meson_version : '>=0.46.0',
  5. default_options : [
  6. 'c_std=c89', 'optimization=2',
  7. 'warning_level=2'
  8. ]
  9. )
  10. parson_sources = ['parson.c']
  11. parson_inc = include_directories('.')
  12. parson_lib = library(
  13. meson.project_name(),
  14. sources: parson_sources,
  15. install: true
  16. )
  17. install_headers('parson.h')
  18. parson = declare_dependency(
  19. include_directories : parson_inc,
  20. link_with : parson_lib
  21. )
  22. pkgconfig = import('pkgconfig')
  23. # will create a pkg config
  24. pkgconfig.generate(parson_lib,
  25. version: meson.project_version(),
  26. filebase: meson.project_name(),
  27. name: meson.project_name(),
  28. description: 'Lightweight JSON library written in C.',
  29. )