-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathSConstruct
84 lines (68 loc) · 1.77 KB
/
SConstruct
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
72
73
74
75
76
77
78
79
80
81
82
83
84
#! /usr/bin/env python
import os
###################################################################
# LOAD THE ENVIRONMENT AND SET UP THE TOOLS
###################################################################
# Load the builders in config
env = Environment(
ENV=os.environ,
tools=['default', 'pkgconfig', 'qt5muc'],
toolpath=['admin']
)
env.Replace(LIBS="")
env.Replace(LIBPATH="")
env.MergeFlags(['-Wall', '-Werror', '-g', '-fpic', '-std=c++11'])
tests = {}
tests.update(env['PKGCONFIG_TESTS'])
conf = Configure(
env,
custom_tests=tests,
conf_dir='cache',
log_file='cache/config.log'
)
if not conf.CheckHeader('stdio.h', language="C"):
Exit(1)
if not conf.CheckHeader("iostream", language="C++"):
Exit(1)
allpresent = 1
allpresent &= conf.CheckForPKGConfig()
pkgs = {
'jack': '0.100.0',
#'lash-1.0': '0.5.1',
'Qt5Core': '5.3',
'Qt5Widgets': '5.3',
'Qt5Gui': '5.3',
'Qt5Xml': '5.3',
'alsa': '1.0'
}
for pkg in pkgs:
name2 = pkg.replace("+", "").replace(".", "").replace("-", "").upper()
res = conf.GetPKGFlags(pkg, pkgs[pkg])
if isinstance(res, bytes):
res = res.decode()
env['%s_FLAGS' % name2] = res
if env['%s_FLAGS' % name2] == 0:
allpresent &= 0
if not allpresent:
print(
"(At least) One of the dependencies is missing. I can't go on without it..."
)
Exit(1)
env = conf.Finish()
env.MergeFlags("-I#")
print("Merging %s" % env["QT5WIDGETS_FLAGS"])
env.MergeFlags(env["QT5WIDGETS_FLAGS"])
# target processing is done in the subdirectory
env.SConscript(
dirs=[
'libcore',
#'libqlash',
'libgui',
'backend',
'libmatrix',
'libelements',
'libcontrol',
'jackmix'
],
exports="env"
)