package An official xmake package repository
https://xrepo.xmake.io/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.5 KiB
54 lines
1.5 KiB
4 years ago
|
add_rules("mode.debug", "mode.release")
|
||
|
|
||
|
if is_plat("linux") then
|
||
|
add_requires("libx11", "xorgproto")
|
||
|
end
|
||
|
|
||
|
target("glew")
|
||
|
set_kind("$(kind)")
|
||
|
if is_plat("windows") or is_plat("mingw") then
|
||
|
set_basename("glew32")
|
||
|
add_syslinks("glu32", "opengl32")
|
||
|
elseif is_plat("macosx") then
|
||
|
add_frameworks("OpenGL")
|
||
|
elseif is_plat("linux") then
|
||
|
add_syslinks("GLU", "GL")
|
||
|
end
|
||
|
add_defines("GLEW_NO_GLU")
|
||
|
if is_plat("windows") then
|
||
|
if get_config("kind") == "shared" then
|
||
|
add_defines("GLEW_BUILD")
|
||
|
else
|
||
|
add_defines("GLEW_STATIC", {public = true})
|
||
|
end
|
||
|
end
|
||
|
add_files("src/glew.c")
|
||
|
add_includedirs("include", {public = true})
|
||
|
add_headerfiles("include/(GL/*.h)")
|
||
|
|
||
|
target("glewinfo")
|
||
|
set_kind("binary")
|
||
|
add_deps("glew")
|
||
|
if is_plat("windows") or is_plat("mingw") then
|
||
|
add_syslinks("user32", "gdi32", "glu32", "opengl32")
|
||
|
elseif is_plat("macosx") then
|
||
|
add_frameworks("OpenGL")
|
||
|
elseif is_plat("linux") then
|
||
|
add_syslinks("GLU", "GL")
|
||
|
add_packages("libx11", "xorgproto")
|
||
|
end
|
||
|
add_files("src/glewinfo.c")
|
||
|
|
||
|
target("visualinfo")
|
||
|
set_kind("binary")
|
||
|
add_deps("glew")
|
||
|
if is_plat("windows") or is_plat("mingw") then
|
||
|
add_syslinks("user32", "gdi32", "glu32", "opengl32")
|
||
|
elseif is_plat("macosx") then
|
||
|
add_frameworks("OpenGL")
|
||
|
elseif is_plat("linux") then
|
||
|
add_syslinks("GLU", "GL")
|
||
|
add_packages("libx11", "xorgproto")
|
||
|
end
|
||
|
add_files("src/visualinfo.c")
|