fix emscripten builds on windows
[liba.git] / quickjs / xmake.lua
blob5e6ab73ee97ca4389a186e769f322a538a3f40ab
1 ---@diagnostic disable
2 -- option: liba-quickjs
3 option("liba-quickjs")
4 set_default(false)
5 set_showmenu(true)
6 set_category("liba")
7 set_description("Enable/Disable QuickJS")
8 option_end()
10 if not is_plat("windows") and has_config("liba-quickjs") then
11 add_requires("quickjs")
12 target("aqjs")
13 set_kind("shared")
14 add_files("src/**.c")
15 add_defines("A_EXPORTS")
16 on_load(function(target)
17 target:set("targetdir", path.join(target:targetdir(), "quickjs"))
18 end)
19 on_install(function(target)
20 local installdir = target:installdir()
21 if installdir then
22 print("installing %s to %s ..", target:name(), installdir)
23 installdir = path.join(installdir, "lib", "quickjs")
24 os.mkdir(installdir)
25 os.vcp(target:targetfile(), installdir)
26 end
27 end)
28 add_packages("quickjs")
29 set_filename("liba.so")
30 add_deps("a")
31 target_end()
32 end