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/Xlib.h>
#include <X11/Xutil.h>
#include <glad/glad.h>
#include <glad_2/glad.h>
#ifndef __glad_glxext_h_

View File

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

View File

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