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
pull/1313/head
yszhou2019 2 years ago committed by GitHub
parent 9306ce554c
commit 7ca5c4d779
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 19
      packages/q/quickjs/xmake.lua

@ -3,15 +3,20 @@ package("quickjs")
set_homepage("https://bellard.org/quickjs/")
set_description("QuickJS is a small and embeddable Javascript engine")
add_urls("https://github.com/bellard/quickjs.git")
add_versions("2021.03.27", "b5e62895c619d4ffc75c9d822c8d85f1ece77e5b")
if is_plat("windows") then
add_urls("https://github.com/xmake-mirror/quickjs.git")
add_versions("2021.03.27", "c83f82dce8988334be6c6a7b9b029eb963e7e310")
else
add_urls("https://github.com/bellard/quickjs.git")
add_versions("2021.03.27", "b5e62895c619d4ffc75c9d822c8d85f1ece77e5b")
end
if is_plat("linux", "macosx", "iphoneos", "cross") then
add_syslinks("pthread", "dl", "m")
elseif is_plat("android") then
add_syslinks("dl", "m")
end
on_install("linux", "macosx", "iphoneos", "android", "mingw", "cross", function (package)
io.writefile("xmake.lua", ([[
add_rules("mode.debug", "mode.release")
@ -38,6 +43,14 @@ package("quickjs")
import("package.tools.xmake").install(package, configs)
end)
on_install("windows", function (package)
local configs = {}
if package:config("shared") then
configs.kind = "shared"
end
import("package.tools.xmake").install(package, configs)
end)
on_test(function (package)
assert(package:has_cfuncs("JS_NewRuntime", {includes = "quickjs.h"}))
end)
Loading…
Cancel
Save