From 735d31eba9cf820ac8fdc18eb052f5a8df995e60 Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 5 Nov 2021 20:43:50 +0800 Subject: [PATCH] Update xmake.lua --- packages/p/pcre2/xmake.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/p/pcre2/xmake.lua b/packages/p/pcre2/xmake.lua index 622151be5..bceda0810 100644 --- a/packages/p/pcre2/xmake.lua +++ b/packages/p/pcre2/xmake.lua @@ -16,7 +16,11 @@ package("pcre2") on_load(function (package) local bitwidth = package:config("bitwidth") or "8" - package:add("links", "pcre2-" .. bitwidth) + if package:version():ge("10.39") and package:is_plat("windows") and not package:config("shared") then + package:add("links", "pcre2-" .. bitwidth .. "-static") + else + package:add("links", "pcre2-" .. bitwidth) + end package:add("defines", "PCRE2_CODE_UNIT_WIDTH=" .. bitwidth) if not package:config("shared") then package:add("defines", "PCRE2_STATIC")