allow installing include files; do not install test application

This commit is contained in:
Josh Holtrop 2016-04-06 13:39:37 -04:00
parent 793441dc05
commit 8a0cdcf37d
2 changed files with 19 additions and 3 deletions

View File

@ -9,3 +9,11 @@ clean:
.PHONY: distclean
distclean:
./waf distclean
.PHONY: install
install:
./waf install
.PHONY: uninstall
uninstall:
./waf uninstall

14
wscript
View File

@ -1,6 +1,7 @@
def options(opt):
opt.load("compiler_c compiler_cxx")
opt.add_option("--without-tests",
opt.add_option(
"--without-tests",
action = "store_true",
dest = "without_tests",
default = False,
@ -25,9 +26,16 @@ def build(bld):
if not bld.env.WITHOUT_TESTS:
test_sources = bld.path.ant_glob("test/**/*.cpp") + \
bld.path.ant_glob("test/**/*.c")
bld.program(source = test_sources,
bld.program(
source = test_sources,
target = "glcxx-test",
use = "glcxx",
uselib = "SDL2",
lib = ["dl", "GL"],
linkflags = ["-Wl,-rpath,$ORIGIN"])
linkflags = ["-Wl,-rpath,$ORIGIN"],
install_path = None)
bld.install_files(
"${PREFIX}",
bld.path.ant_glob("include/**"),
relative_trick = True)