fix #38 and possibly #43

This commit is contained in:
Irlan 2018-06-26 17:50:00 -03:00
parent 93ac1faa7c
commit 73777b9f1a
3 changed files with 42 additions and 32 deletions

View File

@ -22,7 +22,7 @@
#include <X11/X.h> #include <X11/X.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xutil.h> #include <X11/Xutil.h>
#include <glad/glad.h> #include <glad_2/glad.h>
#ifndef __glad_glxext_h_ #ifndef __glad_glxext_h_

View File

@ -22,7 +22,7 @@
#include <X11/X.h> #include <X11/X.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xutil.h> #include <X11/Xutil.h>
#include <glad/glad.h> #include <glad_4/glad.h>
#ifndef __glad_glxext_h_ #ifndef __glad_glxext_h_

View File

@ -109,31 +109,44 @@ solution (solution_name)
includedirs { external_dir } includedirs { external_dir }
vpaths { ["Headers"] = "**.h", ["Sources"] = "**.c" } vpaths { ["Headers"] = "**.h", ["Sources"] = "**.c" }
if is_gfxapi("opengl_2") then configuration { "windows" }
files if is_gfxapi("opengl_2") then
{ files
external_dir .. "/glad_2/khrplatform.h", {
external_dir .. "/glad_2/glad.h", external_dir .. "/glad_2/khrplatform.h",
external_dir .. "/glad_2/glad.c", external_dir .. "/glad_2/glad.h",
} external_dir .. "/glad_2/glad.c",
end }
end
if is_gfxapi("opengl_4") then
files
{
external_dir .. "/glad_4/khrplatform.h",
external_dir .. "/glad_4/glad.h",
external_dir .. "/glad_4/glad.c",
}
end
if is_gfxapi("opengl_4") then configuration { "linux" }
files if is_gfxapi("opengl_2") then
{ files
external_dir .. "/glad_4/khrplatform.h", {
external_dir .. "/glad_4/glad.h", external_dir .. "/glad_2/khrplatform.h",
external_dir .. "/glad_4/glad.c", external_dir .. "/glad_2/glad_glx.h",
} external_dir .. "/glad_2/glad_glx.c",
end }
end
configuration { "not windows", "not macosx" }
files if is_gfxapi("opengl_4") then
{ files
external_dir .. "/glad_4/glad_glx.h", {
external_dir .. "/glad_4/glad_glx.c", external_dir .. "/glad_4/khrplatform.h",
} external_dir .. "/glad_4/glad_glx.h",
external_dir .. "/glad_4/glad_glx.c",
}
end
project "glfw" project "glfw"
kind "StaticLib" kind "StaticLib"
language "C" language "C"
@ -179,7 +192,7 @@ solution (solution_name)
} }
-- linux -- linux
configuration { "not windows", "not macosx" } configuration { "linux" }
buildoptions { "-pthread" } buildoptions { "-pthread" }
files files
{ {
@ -323,11 +336,8 @@ solution (solution_name)
configuration { "windows" } configuration { "windows" }
links { "opengl32", "winmm" } links { "opengl32", "winmm" }
configuration { "not windows", "not macosx" } configuration { "linux" }
links links { "GL", "X11", "Xrandr", "Xinerama", "Xcursor", "pthread", "dl" }
{
"GL", "rt", "m", "dl", "pthread"
}
project "hello_world" project "hello_world"
kind "ConsoleApp" kind "ConsoleApp"