meson.build 785 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. project(
  2. 'scufcont',
  3. 'c',
  4. version: '0.0.1',
  5. default_options: {
  6. 'buildtype': 'release'
  7. }
  8. )
  9. c_args = [
  10. '-std=c99',
  11. '-Wall',
  12. '-Wextra',
  13. '-pedantic'
  14. ]
  15. cmocka_dep = dependency('cmocka')
  16. scufcont_include = include_directories('include')
  17. scufcont_lib = library(
  18. 'scufcont',
  19. 'src/DString.c',
  20. 'src/scufcont.c',
  21. include_directories: [
  22. scufcont_include
  23. ],
  24. c_args: [
  25. c_args,
  26. '-D_SCUFCONT_VERSION="' + meson.project_version() + '"',
  27. ]
  28. )
  29. scufcont_dep = declare_dependency(
  30. compile_args: [
  31. c_args,
  32. '-D_SCUFCONT_VERSION="' + meson.project_version() + '"',
  33. ],
  34. include_directories: scufcont_include,
  35. link_with: scufcont_lib,
  36. version: meson.project_version()
  37. )
  38. if get_option('SCUFCONT_BUILD_TESTS') == true
  39. subdir('tests')
  40. endif