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