-
Notifications
You must be signed in to change notification settings - Fork 22
/
SConscript
68 lines (55 loc) · 1.46 KB
/
SConscript
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
Import( 'project', 'libs' )
import os.path
name = project.getName()
incdirs = ['src/common', 'src/application']
src_common = project.scanFiles( ['src/common'], accept=['*.cpp','*.c'] )
src_application = project.scanFiles( ['src/application'], accept=['*.cpp','*.c'] )
src_ui = project.scanFiles( ['src/application'], accept=['*.ui'] )
src_swig = project.scanFiles( ['src/common'], accept=['*.i'] )
#print 'src_ui:', src_ui
libraries = [
libs.boost,
libs.m,
libs.pthread,
libs.python,
]
librariesGui = [
libs.qt4(modules=['QtCore', 'QtGui', 'QtOpenGL'], uiFiles=src_ui)
]
project.StaticLibrary(
'qSamCommon',
sources = src_common,
libraries = libraries,
shared = True,
)
pythonOutputDir = os.path.join( project.inOutputDir(), 'python' )
swigGlobalFlags={
'CPPPATH': incdirs,
'SWIGFLAGS': ['-python','-c++','-Wall'],
'SWIGPATH': incdirs,
'SWIGOUTDIR': pythonOutputDir,
}
swigReplaceFlags = {
'SHLIBPREFIX': '',
'LIBPREFIX': '',
}
swigWrap = project.SharedLibrary(
target = '_'+name,
sources = src_swig,
globalEnvFlags = swigGlobalFlags,
replaceLocalEnvFlags = swigReplaceFlags,
libraries = [libs.qSamCommon],
installDir = pythonOutputDir,
)
appli = project.Program(
target = name,
sources = src_application,
libraries = [libs.qSamCommon]+librariesGui,
globalEnvFlags = {'CPPPATH':incdirs},
installDir = project.inOutputBin(),
)
Depends( appli, swigWrap )
#Alias( 'all', swigWrap )
#Alias( 'all', appli )
#Alias( name, swigWrap )
Alias( name, appli )