|
@@ -6,7 +6,7 @@ end
|
|
|
|
|
|
target("glew")
|
|
|
set_kind("$(kind)")
|
|
|
- if is_plat("windows") or is_plat("mingw") then
|
|
|
+ if is_plat("windows", "mingw") then
|
|
|
set_basename("glew32")
|
|
|
add_syslinks("glu32", "opengl32")
|
|
|
elseif is_plat("macosx") then
|
|
@@ -16,11 +16,13 @@ target("glew")
|
|
|
end
|
|
|
add_defines("GLEW_NO_GLU")
|
|
|
if is_plat("windows") then
|
|
|
- if get_config("kind") == "shared" then
|
|
|
+ if is_kind("shared") then
|
|
|
add_defines("GLEW_BUILD")
|
|
|
else
|
|
|
add_defines("GLEW_STATIC", {public = true})
|
|
|
end
|
|
|
+ elseif is_plat("mingw") and not is_kind("shared") then
|
|
|
+ add_defines("GLEW_STATIC", {public = true})
|
|
|
end
|
|
|
add_files("src/glew.c")
|
|
|
add_includedirs("include", {public = true})
|
|
@@ -29,7 +31,7 @@ target("glew")
|
|
|
target("glewinfo")
|
|
|
set_kind("binary")
|
|
|
add_deps("glew")
|
|
|
- if is_plat("windows") or is_plat("mingw") then
|
|
|
+ if is_plat("windows", "mingw") then
|
|
|
add_syslinks("user32", "gdi32", "glu32", "opengl32")
|
|
|
elseif is_plat("macosx") then
|
|
|
add_frameworks("OpenGL")
|
|
@@ -42,7 +44,7 @@ target("glewinfo")
|
|
|
target("visualinfo")
|
|
|
set_kind("binary")
|
|
|
add_deps("glew")
|
|
|
- if is_plat("windows") or is_plat("mingw") then
|
|
|
+ if is_plat("windows", "mingw") then
|
|
|
add_syslinks("user32", "gdi32", "glu32", "opengl32")
|
|
|
elseif is_plat("macosx") then
|
|
|
add_frameworks("OpenGL")
|