support windows for luajit/zlib

pull/3/head
ruki 6 years ago
parent ac9414e169
commit 5fef845ca8
  1. 6
      packages/l/luajit/xmake.lua
  2. 9
      packages/p/pcre2/xmake.lua
  3. 9
      packages/z/zlib/xmake.lua

@ -27,3 +27,9 @@ package("luajit")
on_install("macosx", "linux", function (package)
os.vrun("make install")
end)
on_install("windows", function (package)
os.cp("src/lua51.lib", package:installdir("lib"))
os.cp("src/lua51.dll", package:installdir("lib"))
os.cp("src/*.h", package:installdir("include"))
end)

@ -10,6 +10,15 @@ package("pcre2")
add_versions("10.30", "3677ce17854fffa68fce6b66442858f48f0de1f537f18439e4bd2771f8b4c7fb")
add_versions("10.31", "b4b40695a5347a770407d492c1749e35ba3970ca03fe83eb2c35d44343a5a444")
if is_host("windows") then
add_deps("cmake")
end
on_build("windows", function (package)
os.vrun("cmake .")
os.vrun("make")
end)
on_build("macosx", "linux", function (package)
os.vrun("./configure --prefix=%s", package:installdir())
os.vrun("make")

@ -14,6 +14,15 @@ package("zlib")
os.vrun("make")
end)
on_build("windows", function (package)
os.vrun("nmake -f win32\\Makefile.msc zlib.lib")
end)
on_install("macosx", "linux", function (package)
os.vrun("make install")
end)
on_install("windows", function (package)
os.cp("zlib.lib", package:installdir("lib"))
os.cp("*.h", package:installdir("include"))
end)

Loading…
Cancel
Save