xmake.lua 815 B

1234567891011121314151617181920212223
  1. package("mdns")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/mjansson/mdns")
  4. set_description("Public domain mDNS/DNS-SD library in C")
  5. add_urls("https://github.com/mjansson/mdns/archive/refs/tags/$(version).tar.gz",
  6. "https://github.com/mjansson/mdns.git")
  7. add_versions("1.4.2", "c69cfdebe28a489c85f33744f7811c40572a9769a81cd57ecc09ef95802347f2")
  8. add_deps("cmake")
  9. if is_plat("windows", "mingw") then
  10. add_syslinks("iphlpapi", "ws2_32")
  11. end
  12. on_install(function (package)
  13. local configs = {"-DMDNS_BUILD_EXAMPLE=OFF"}
  14. import("package.tools.cmake").install(package, configs)
  15. end)
  16. on_test(function (package)
  17. assert(package:has_cfuncs("mdns_query_answer_multicast", {includes = "mdns.h"}))
  18. end)