-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwscript
More file actions
71 lines (54 loc) · 1.79 KB
/
wscript
File metadata and controls
71 lines (54 loc) · 1.79 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/usr/bin/env python
# encoding: utf-8
# waf script for builduing project
# author: Anton Feldmann
# Copyright 2016 anton.feldmann@gmail.com
# license: MIT
import os, sys
from waflib import Build, TaskGen
name = 'libshm'
major = 0
minor = 1
bugfix = 0
name_version = '%s-%d.%d.%d' % (name, major, minor, bugfix)
application = name
version = '%d.%d.%d' % (major, minor, bugfix)
top = '.'
out = 'build'
def options(opt):
opt.load('compiler_cxx compiler_c')
#Add configuration options
shmopt = opt.add_option_group ("%s Options" % name.upper())
shmopt.add_option('--shared',
action='store_true',
default=False,
help='build all libs as shared libs')
shmopt.add_option('--clang',
action='store_true',
default=True,
help='usec lang')
def configure(conf):
from waflib import Options
if Options.options.clang:
conf.load('clang clang++')
else:
conf.load('compiler_cxx compiler_c')
def build(bld):
# libshm headerfile install
bld.install_files('${PREFIX}/include/libshm/', bld.path.ant_glob(['include/libshm/*.hpp'], remove=False))
bld.install_files('${PREFIX}/include/libshm/', bld.path.ant_glob(['include/libshm/*.tpp'], remove=False))
from waflib import Options
# process libshm.pc.in -> libshm.pc - by default it use the task "env" attribute
pcf = bld(
features = 'subst',
source = '%s.pc.in' % name,
target = '%s.pc' % name,
install_path = '${PREFIX}/lib/pkgconfig/'
)
pcf.env.table.update(
{'LIBS':'',
'VERSION': version,
'NAME': name,
'PREFIX': '%s' % Options.options.prefix,
'INCLUDEDIR': 'include/%s' % name}
)