add APPNAME and VERSION defines
This commit is contained in:
parent
40b6518ea4
commit
bd1f1bd655
@ -72,7 +72,7 @@ bool Window::create()
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_window = SDL_CreateWindow(
|
m_window = SDL_CreateWindow(
|
||||||
"jes",
|
APPNAME,
|
||||||
SDL_WINDOWPOS_UNDEFINED,
|
SDL_WINDOWPOS_UNDEFINED,
|
||||||
SDL_WINDOWPOS_UNDEFINED,
|
SDL_WINDOWPOS_UNDEFINED,
|
||||||
INITIAL_WIDTH,
|
INITIAL_WIDTH,
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
int main(int argc, char * argv[])
|
int main(int argc, char * argv[])
|
||||||
{
|
{
|
||||||
Runtime::init(argv[0], "jes");
|
Runtime::init(argv[0], APPNAME);
|
||||||
|
|
||||||
Window w;
|
Window w;
|
||||||
if (!w.create())
|
if (!w.create())
|
||||||
|
10
wscript
10
wscript
@ -2,6 +2,9 @@ import platform
|
|||||||
import re
|
import re
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
|
APPNAME = "jes"
|
||||||
|
VERSION = "0.0.1"
|
||||||
|
|
||||||
def options(opt):
|
def options(opt):
|
||||||
opt.load("compiler_c compiler_cxx")
|
opt.load("compiler_c compiler_cxx")
|
||||||
|
|
||||||
@ -12,13 +15,15 @@ def configure(conf):
|
|||||||
conf.check_cfg(package = "freetype2", args = "--cflags --libs")
|
conf.check_cfg(package = "freetype2", args = "--cflags --libs")
|
||||||
|
|
||||||
def build(bld):
|
def build(bld):
|
||||||
|
defines = ['APPNAME="%s"' % APPNAME]
|
||||||
|
defines += ['VERSION="%s"' % VERSION]
|
||||||
includes = [p for p in bld.path.ant_glob("src/**", dir = True) if os.path.isdir(p.abspath())]
|
includes = [p for p in bld.path.ant_glob("src/**", dir = True) if os.path.isdir(p.abspath())]
|
||||||
includes += ["libs/glcxx/include"]
|
includes += ["libs/glcxx/include"]
|
||||||
bld(features = "c cprogram cxx cxxprogram",
|
bld(features = "c cprogram cxx cxxprogram",
|
||||||
target = "jes",
|
target = APPNAME,
|
||||||
source = bld.path.ant_glob(["src/**/*.cc", "src/**/*.c", "libs/glcxx/src/glcxx/*"]),
|
source = bld.path.ant_glob(["src/**/*.cc", "src/**/*.c", "libs/glcxx/src/glcxx/*"]),
|
||||||
includes = includes,
|
includes = includes,
|
||||||
defines = ['GLCXX_GL_INCLUDE="gl3w.h"'],
|
defines = ['GLCXX_GL_INCLUDE="gl3w.h"'] + defines,
|
||||||
cxxflags = ["-Wall", "-std=gnu++14"],
|
cxxflags = ["-Wall", "-std=gnu++14"],
|
||||||
lib = ["dl", "GL"],
|
lib = ["dl", "GL"],
|
||||||
uselib = ["SDL2", "FREETYPE2"])
|
uselib = ["SDL2", "FREETYPE2"])
|
||||||
@ -36,5 +41,6 @@ def build(bld):
|
|||||||
target = "tests",
|
target = "tests",
|
||||||
source = test_sources,
|
source = test_sources,
|
||||||
includes = test_includes,
|
includes = test_includes,
|
||||||
|
defines = defines,
|
||||||
lib = test_libs,
|
lib = test_libs,
|
||||||
cxxflags = ["-Wall", "-std=gnu++14"])
|
cxxflags = ["-Wall", "-std=gnu++14"])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user