forked from ActiaNordic/dbus-cplusplus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SConscript
85 lines (70 loc) · 1.59 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#
# library
#
env = WengoGetEnvironment()
env.ParseConfig('pkg-config --cflags --libs dbus-1')
libs = [
'expat'
]
lib_path = []
include_path = [
'include'
]
defines = {
'DBUS_API_SUBJECT_TO_CHANGE':1,
'DEBUG':1
}
headers = []
sources = [
'src/connection.cpp',
'src/debug.cpp',
'src/dispatcher.cpp',
'src/error.cpp',
'src/eventloop.cpp',
'src/interface.cpp',
'src/introspection.cpp',
'src/property.cpp',
'src/message.cpp',
'src/object.cpp',
'src/pendingcall.cpp',
'src/server.cpp',
'src/types.cpp',
'src/xml.cpp'
]
env.WengoAddDefines(defines)
env.WengoAddIncludePath(include_path)
env.WengoUseLibraries(libs)
env.WengoStaticLibrary('dbus-c++', sources)
#
# tools
#
tools_env = WengoGetEnvironment()
tools_libs = [
'dbus-c++'
]
tools_defines = {
'DBUS_API_SUBJECT_TO_CHANGE':1,
}
introspect_sources = [
'tools/introspect.cpp',
]
xml2cpp_sources = [
'tools/xml2cpp.cpp'
]
#tools_env.Append(LINKFLAGS = '-z origin')
#tools_env.Append(RPATH = env.Literal('\\$$ORIGIN\.'))
tools_env.WengoAddDefines(tools_defines)
tools_env.WengoAddIncludePath(include_path)
tools_env.WengoUseLibraries(tools_libs)
dbusxx_introspect = tools_env.WengoProgram('dbusxx-introspect', introspect_sources)
dbusxx_xml2cpp = tools_env.WengoProgram('dbusxx-xml2cpp', xml2cpp_sources)
#
# xml translator
#
def dbusxx_xml2cpp_emitter(target, source, env):
env.Depends(target, dbusxx_xml2cpp)
return (target, source)
dbusxx_xml2cpp_builder = Builder(action = dbusxx_xml2cpp[0].abspath + ' $SOURCE --adaptor=$TARGET',
emitter = dbusxx_xml2cpp_emitter,
suffix = '.h', src_suffix = '.xml')
Export('dbusxx_xml2cpp_builder')