-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathSConscript
More file actions
36 lines (29 loc) · 1.23 KB
/
SConscript
File metadata and controls
36 lines (29 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import platform
from os import path,walk
def getSuffixedFiles(fpath, fsuffix):
#fpath = path.join("..", fpath);
filelist = []
for (dirpath, dirnames, filenames) in walk(fpath):
filelist += Glob(path.join(dirpath, fsuffix))
return filelist
Import("env")
if platform.linux_distribution()[0] == "Darwin":
install_dir = path.join("/", "opt", "local", "include")
else:
install_dir = path.join("/", "usr", "local", "include")
testfiles = getSuffixedFiles("test", "*.cpp")
incfiles = getSuffixedFiles("include", "*.hpp")
env.Append(CPPPATH=["include", "/opt/local/include"])
#env.Append(LIBS=["boost_unit_test_framework-mt"])
env.Append(LIBPATH=["/usr/local/lib", "/opt/local/lib"])
env.Command(
path.join(install_dir, "semver", "version.hpp"),
path.join("include", "semver", "version.hpp"),
[
Mkdir(path.join(install_dir, "semver")),
Copy(path.join(install_dir, "semver", "version.hpp"), path.join("include", "semver", "version.hpp"))
]
)
env.Install(dir = [ path.join("build", "include", "semver") ], source = [ path.join("include", "semver", "version.hpp") ])
env.Alias("install", [ path.join(install_dir) ])
env.Program(target = path.join("build", "semvar-test"), source = testfiles)