xmake.lua 1.2 KB

12345678910111213141516171819202122232425262728
  1. package("libusbmuxd")
  2. set_homepage("https://github.com/libimobiledevice/libusbmuxd")
  3. set_description("A client library to multiplex connections from and to iOS devices")
  4. set_license("LGPL-2.1")
  5. add_urls("https://github.com/libimobiledevice/libusbmuxd.git")
  6. add_versions("2021.09.13", "2ec5354a6ff2ba5e2740eabe7402186f29294f79")
  7. add_deps("libimobiledevice-glue")
  8. if is_plat("windows", "mingw") then
  9. add_syslinks("ws2_32")
  10. end
  11. on_install("macosx", "linux", "mingw@macosx", function (package)
  12. local configs = {}
  13. table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
  14. table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes"))
  15. if package:is_plat("linux") and package:config("pic") ~= false then
  16. table.insert(configs, "--with-pic")
  17. end
  18. io.replace("tools/Makefile.am", "bin_PROGRAMS = iproxy inetcat", "bin_PROGRAMS =")
  19. import("package.tools.autoconf").install(package, configs)
  20. end)
  21. on_test(function (package)
  22. assert(package:has_cfuncs("usbmuxd_events_subscribe", {includes = "usbmuxd.h"}))
  23. end)