Skip to content

Commit 7ca5c4d

Browse files
authored
update qjs msvc (#1309)
* update quickjs msvc * specific msrt in premake5.lua * local MD/MT succ * move dll to bin * change premake to xmake * remove unused syslink * set mirror image instead of patch * fix log2
1 parent 9306ce5 commit 7ca5c4d

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

packages/q/quickjs/xmake.lua

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,20 @@ package("quickjs")
33
set_homepage("https://bellard.org/quickjs/")
44
set_description("QuickJS is a small and embeddable Javascript engine")
55

6-
add_urls("https://github.com/bellard/quickjs.git")
7-
add_versions("2021.03.27", "b5e62895c619d4ffc75c9d822c8d85f1ece77e5b")
6+
if is_plat("windows") then
7+
add_urls("https://github.com/xmake-mirror/quickjs.git")
8+
add_versions("2021.03.27", "c83f82dce8988334be6c6a7b9b029eb963e7e310")
9+
else
10+
add_urls("https://github.com/bellard/quickjs.git")
11+
add_versions("2021.03.27", "b5e62895c619d4ffc75c9d822c8d85f1ece77e5b")
12+
end
813

914
if is_plat("linux", "macosx", "iphoneos", "cross") then
1015
add_syslinks("pthread", "dl", "m")
1116
elseif is_plat("android") then
1217
add_syslinks("dl", "m")
1318
end
14-
19+
1520
on_install("linux", "macosx", "iphoneos", "android", "mingw", "cross", function (package)
1621
io.writefile("xmake.lua", ([[
1722
add_rules("mode.debug", "mode.release")
@@ -38,6 +43,14 @@ package("quickjs")
3843
import("package.tools.xmake").install(package, configs)
3944
end)
4045

46+
on_install("windows", function (package)
47+
local configs = {}
48+
if package:config("shared") then
49+
configs.kind = "shared"
50+
end
51+
import("package.tools.xmake").install(package, configs)
52+
end)
53+
4154
on_test(function (package)
4255
assert(package:has_cfuncs("JS_NewRuntime", {includes = "quickjs.h"}))
4356
end)

0 commit comments

Comments
 (0)