rm wscript
This commit is contained in:
parent
e4d3a542f9
commit
f90998c1d6
41
wscript
41
wscript
@ -1,41 +0,0 @@
|
||||
import os
|
||||
|
||||
def options(opt):
|
||||
opt.load("compiler_c compiler_cxx")
|
||||
|
||||
def configure(conf):
|
||||
conf.load("compiler_c compiler_cxx")
|
||||
conf.env.INCLUDES += ["libs/glcxx/include"]
|
||||
conf.env.INCLUDES += ["libs/glm"]
|
||||
conf.env.INCLUDES += ["src"]
|
||||
conf.env.DEFINES += ['''GLCXX_GL_INCLUDE="GL3/gl3w.h"''']
|
||||
conf.env.CXXFLAGS += ["-Wall"]
|
||||
conf.env.CXXFLAGS += ["-std=gnu++14"]
|
||||
conf.check_cfg(package = "sdl2", args = "--cflags --libs")
|
||||
conf.check_cfg(package = "freetype2", uselib_store = "FreeType2", args = "--cflags --libs")
|
||||
if "MINGW" in os.popen("uname").read():
|
||||
# TODO: set CXX to mingw32-g++
|
||||
pass
|
||||
if os.listdir("libs/glcxx") == []:
|
||||
print("Fetching git submodules...")
|
||||
from subprocess import Popen
|
||||
Popen(["git", "submodule", "update", "--init"]).wait()
|
||||
|
||||
def build(bld):
|
||||
sources = \
|
||||
bld.path.ant_glob("src/**/*.cc") + \
|
||||
bld.path.ant_glob("libs/glcxx/src/**/*.cpp") + \
|
||||
bld.path.ant_glob("src/GL3/**/*.c")
|
||||
|
||||
libs = []
|
||||
if "MINGW" in os.popen("uname").read():
|
||||
libs += ["opengl32", "mingw32"]
|
||||
else:
|
||||
libs += ["dl", "GL"]
|
||||
bld.program(
|
||||
source = sources,
|
||||
target = "freetype2gl3",
|
||||
uselib = ["SDL2", "FreeType2"],
|
||||
lib = libs,
|
||||
linkflags = ["-Wl,-rpath,$ORIGIN"],
|
||||
install_path = None)
|
Loading…
x
Reference in New Issue
Block a user