BUILD.gn 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # Copyright 2016 Google Inc.
  2. #
  3. # Use of this source code is governed by a BSD-style license that can be
  4. # found in the LICENSE file.
  5. declare_args() {
  6. }
  7. import("../third_party.gni")
  8. third_party("libmicrohttpd") {
  9. public_include_dirs = [ "../externals/microhttpd/src/include" ]
  10. include_dirs = [ "." ]
  11. sources = [
  12. "../externals/microhttpd/src/microhttpd/base64.c",
  13. "../externals/microhttpd/src/microhttpd/connection.c",
  14. "../externals/microhttpd/src/microhttpd/daemon.c",
  15. "../externals/microhttpd/src/microhttpd/internal.c",
  16. "../externals/microhttpd/src/microhttpd/memorypool.c",
  17. "../externals/microhttpd/src/microhttpd/postprocessor.c",
  18. "../externals/microhttpd/src/microhttpd/reason_phrase.c",
  19. "../externals/microhttpd/src/microhttpd/response.c",
  20. "../externals/microhttpd/src/microhttpd/tsearch.c",
  21. ]
  22. defines = [ "DAUTH_SUPPORT=1" ]
  23. libs = []
  24. if (is_win) {
  25. sources += [ "../externals/microhttpd/src/platform/w32functions.c" ]
  26. defines += [
  27. "HAVE_SYS_TYPES_H=1",
  28. "HAVE_TIME_H=1",
  29. "MHD_USE_W32_THREADS=1",
  30. "WINDOWS",
  31. ]
  32. libs += [ "Ws2_32.lib" ]
  33. } else {
  34. defines += [
  35. "HAVE_NETINET_IN_H=1",
  36. "HAVE_PTHREAD_H=1",
  37. "HAVE_SYS_SOCKET_H=1",
  38. "MHD_USE_POSIX_THREADS=1",
  39. ]
  40. }
  41. }