0
|
1 |
load(moc)
|
|
2 |
|
|
3 |
isEmpty(QMAKE_QDBUSXML2CPP) {
|
|
4 |
win32:QMAKE_QDBUSXML2CPP = $$[QT_INSTALL_BINS]\qdbusxml2cpp.exe
|
|
5 |
else:QMAKE_QDBUSXML2CPP = $$[QT_INSTALL_BINS]/qdbusxml2cpp
|
|
6 |
}
|
|
7 |
|
|
8 |
for(DBUS_INTERFACE, $$list($$unique(DBUS_INTERFACES))) {
|
|
9 |
|
|
10 |
!contains(DBUS_INTERFACE, .*\w\.xml$) {
|
|
11 |
warning("Invalid D-BUS interface : '$${DBUS_INTERFACE}', please use 'com.mydomain.myinterface.xml' instead.")
|
|
12 |
next()
|
|
13 |
}
|
|
14 |
|
|
15 |
DBUS_INTERFACE_LIST += $${DBUS_INTERFACE}
|
|
16 |
}
|
|
17 |
|
|
18 |
dbus_interface_header.commands = $$QMAKE_QDBUSXML2CPP -p ${QMAKE_FILE_OUT}: ${QMAKE_FILE_IN}
|
|
19 |
dbus_interface_header.output_function = dbus_interface_header_output
|
|
20 |
dbus_interface_header.name = DBUSXML2CPP INTERFACE HEADER ${QMAKE_FILE_IN}
|
|
21 |
dbus_interface_header.variable_out = DBUS_INTERFACE_HEADERS
|
|
22 |
dbus_interface_header.input = DBUS_INTERFACE_LIST
|
|
23 |
|
|
24 |
defineReplace(dbus_interface_header_output) {
|
|
25 |
return("$$lower($$section($$list($$basename(1)),.,-2,-2))_interface.h")
|
|
26 |
}
|
|
27 |
|
|
28 |
dbus_interface_source.commands = $$QMAKE_QDBUSXML2CPP -i ${QMAKE_FILE_OUT_BASE}.h -p :${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
|
|
29 |
dbus_interface_source.output_function = dbus_interface_source_output
|
|
30 |
dbus_interface_source.name = DBUSXML2CPP INTERFACE SOURCE ${QMAKE_FILE_IN}
|
|
31 |
dbus_interface_source.variable_out = SOURCES
|
|
32 |
dbus_interface_source.input = DBUS_INTERFACE_LIST
|
|
33 |
|
|
34 |
dbus_interface_moc.commands = $$moc_header.commands
|
|
35 |
dbus_interface_moc.output = $$moc_header.output
|
|
36 |
dbus_interface_moc.depends = $$dbus_interface_header.output
|
|
37 |
dbus_interface_moc.input = DBUS_INTERFACE_HEADERS
|
|
38 |
dbus_interface_moc.variable_out = GENERATED_SOURCES
|
|
39 |
dbus_interface_moc.name = $$moc_header.name
|
|
40 |
|
|
41 |
defineReplace(dbus_interface_source_output) {
|
|
42 |
return("$$lower($$section($$list($$basename(1)),.,-2,-2))_interface.cpp")
|
|
43 |
}
|
|
44 |
|
|
45 |
QMAKE_EXTRA_COMPILERS += dbus_interface_header dbus_interface_source dbus_interface_moc
|