fix static lib for glew

Signed-off-by: biobot <biobot94@gmail.com>
pull/69/head
biobot 4 years ago
parent 07c868c2a1
commit 91e55d5b65
  1. 12
      packages/g/glew/xmake.lua

@ -11,8 +11,8 @@ package("glew")
add_versions("2.1.0", "2700383d4de2455f06114fbaf872684f15529d4bdc5cdea69b5fb0e9aa7763f1")
end
on_load("windows", function (package)
package:add("links", "glew32s")
on_load("windows", "mingw", function (package)
package:add("links", is_plat("windows") and "glew32s" or "glew32")
end)
if is_plat("mingw") then
@ -38,5 +38,11 @@ package("glew")
on_install("mingw", function (package)
os.cd("build/cmake")
import("package.tools.cmake").install(package)
local configs = {}
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
import("package.tools.cmake").install(package, configs, {buildir = "build"})
if package:config("shared") then
os.cp("build/bin/*.dll", package:installdir("lib"))
end
end)

Loading…
Cancel
Save