meson.build 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. compiler = meson.get_compiler('c')
  2. socket_libs = []
  3. if target_machine.system() == 'windows'
  4. socket_libs = [ compiler.find_library('ws2_32') ]
  5. endif
  6. if target_machine.system() == 'sunos'
  7. socket_libs = [ compiler.find_library('socket')
  8. , compiler.find_library('nsl')
  9. ]
  10. elif target_machine.system() == 'haiku'
  11. socket_libs = [ compiler.find_library('network') ]
  12. endif
  13. executable('fcgi-responder',
  14. sources: 'fcgi-responder.c',
  15. dependencies: [ common_flags, socket_libs ]
  16. )
  17. executable('scgi-responder',
  18. sources: 'scgi-responder.c',
  19. dependencies: [ common_flags, socket_libs ]
  20. )
  21. env = environment()
  22. env.set('srcdir', meson.current_source_dir())
  23. env.set('top_builddir', meson.build_root())
  24. tests = [
  25. 'request.t',
  26. 'core-condition.t',
  27. 'mod-fastcgi.t',
  28. 'mod-scgi.t',
  29. ]
  30. # just hope it will run the tests in the given order
  31. test('prepare', find_program('./prepare.sh'), env: env, is_parallel: false)
  32. foreach t: tests
  33. test(t, find_program('./' + t), env: env, is_parallel: false)
  34. endforeach
  35. test('cleanup', find_program('./cleanup.sh'), env: env, is_parallel: false)