pcre2: control jit option in description scope. (#1027)

* pcre2: control jit option in description scope.

* trigger ci
pull/1030/head
Chen Yufei 3 years ago committed by GitHub
parent d54f060b96
commit 55190bca9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      packages/p/pcre2/xmake.lua

@ -9,14 +9,12 @@ package("pcre2")
add_deps("cmake")
add_configs("jit", {description = "Enable jit.", default = true, type = "boolean"})
if not is_plat("iphoneos") then
add_configs("jit", {description = "Enable jit.", default = true, type = "boolean"})
end
add_configs("bitwidth", {description = "Set the code unit width.", default = "8", values = {"8", "16", "32"}})
on_load(function (package)
if package:is_plat("iphoneos") then
package:config_set("jit", false)
end
local bitwidth = package:config("bitwidth") or "8"
if package:version():ge("10.39") and package:is_plat("windows") and not package:config("shared") then
package:add("links", "pcre2-" .. bitwidth .. "-static")

Loading…
Cancel
Save