Begin removing SDL
Window and OpenGL context creation working. Keyboard, mouse, window events not yet working.
This commit is contained in:
1 parent
1c673817d2
commit
ff89fc7ca7
5 files changed
+155
-46
No files matched your search
@@ -11,8 +11,11 @@ def options(opt):
|
||||
def configure(conf):
|
||||
conf.load("compiler_c compiler_cxx")
|
||||
conf.check(header_name = "getopt.h", global_define = False)
|
||||
conf.check_cfg(package = "sdl2", args = "--cflags --libs")
|
||||
conf.check_cfg(package = "freetype2", uselib_store = "FreeType2", args = "--cflags --libs")
|
||||
if platform.system() == "Linux":
|
||||
conf.check(header_name = "X11/Xlib.h", global_define = False)
|
||||
elif platform.system() == "Windows":
|
||||
conf.check(header_name = "windows.h", global_define = False)
|
||||
|
||||
def build(bld):
|
||||
defines = ['APPNAME="%s"' % APPNAME]
|
||||
@@ -22,9 +25,11 @@ def build(bld):
|
||||
libs = []
|
||||
if platform.system() == "Linux":
|
||||
defines += ["PLATFORM_LINUX"]
|
||||
libs += ["dl", "GL"]
|
||||
elif re.search(r'MINGW', platform.system()):
|
||||
defines += ["GUI_X"]
|
||||
libs += ["dl", "GL", "X11"]
|
||||
elif platform.system() == "Windows":
|
||||
defines += ["PLATFORM_WINDOWS"]
|
||||
defines += ["GUI_WINDOWS"]
|
||||
libs += ["opengl32"]
|
||||
defines += ['GLCXX_GL_INCLUDE="gl3w.h"']
|
||||
sources = bld.path.ant_glob(["src/**/*.cc", "src/**/*.c", "libs/glcxx/src/glcxx/*"])
|
||||
@@ -35,7 +40,7 @@ def build(bld):
|
||||
defines = defines,
|
||||
cxxflags = ["-Wall", "-std=gnu++14", "-O2", "-Wno-switch"],
|
||||
lib = libs,
|
||||
uselib = ["SDL2", "FreeType2"])
|
||||
uselib = ["FreeType2"])
|
||||
|
||||
test_libs = libs + []
|
||||
if platform.system() == "Linux":
|
||||
@@ -56,4 +61,4 @@ def build(bld):
|
||||
lib = test_libs,
|
||||
cxxflags = ["-Wall", "-std=gnu++14", "--coverage", "-Wno-switch", "-include", "iostream"],
|
||||
linkflags = ["--coverage"],
|
||||
uselib = ["SDL2", "FreeType2"])
|
||||
uselib = ["FreeType2"])
|
||||
Reference in new issue
Block a user