xmake.lua 1.2 KB

12345678910111213141516171819202122232425262728
  1. package("libimobiledevice-glue")
  2. set_homepage("https://github.com/libimobiledevice/libimobiledevice-glue")
  3. set_description("A library with common code used by libraries and tools around the libimobiledevice project")
  4. add_urls("https://github.com/libimobiledevice/libimobiledevice-glue.git")
  5. add_versions("2021.11.24", "106cea58ae2d92fc755705a79e1753b3750edd15")
  6. add_deps("autoconf", "automake", "libplist")
  7. if is_plat("windows", "mingw") then
  8. add_syslinks("ws2_32", "iphlpapi")
  9. end
  10. on_install("macosx", "linux", "mingw@macosx", function (package)
  11. local configs = {}
  12. if package:is_plat("linux") and package:config("pic") ~= false then
  13. table.insert(configs, "--with-pic")
  14. end
  15. table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
  16. table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes"))
  17. table.insert(configs, "--enable-debug=" .. (package:config("debug") and "yes" or "no"))
  18. import("package.tools.autoconf").install(package, configs)
  19. end)
  20. on_test(function (package)
  21. assert(package:has_cfuncs("socket_connect", {includes = "libimobiledevice-glue/socket.h"}))
  22. end)