xmake.lua 1.1 KB

12345678910111213141516171819202122232425262728
  1. package("utf8proc")
  2. set_homepage("https://juliastrings.github.io/utf8proc/")
  3. set_description("A clean C library for processing UTF-8 Unicode data")
  4. set_license("MIT")
  5. add_urls("https://github.com/JuliaStrings/utf8proc/archive/refs/tags/$(version).tar.gz",
  6. "https://github.com/JuliaStrings/utf8proc.git")
  7. add_versions('v2.7.0', '4bb121e297293c0fd55f08f83afab6d35d48f0af4ecc07523ad8ec99aa2b12a1')
  8. if is_plat("windows", "mingw") then
  9. add_configs("shared", {description = "Build shared library.", default = true, type = "boolean", readonly = true})
  10. add_configs("vs_runtime", {description = "Set vs compiler runtime.", default = "MD", readonly = true})
  11. end
  12. add_deps("cmake")
  13. on_install(function (package)
  14. local configs = {
  15. "-DUTF8PROC_ENABLE_TESTING=OFF",
  16. }
  17. table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
  18. import("package.tools.cmake").install(package, configs)
  19. end)
  20. on_test(function (package)
  21. assert(package:has_cfuncs("utf8proc_encode_char", {includes = "utf8proc.h"}))
  22. end)