source: branches/vendor/trolltech/qt/current/mkspecs/features/dbusadaptors.prf @ 2

Last change on this file since 2 was 2, checked in by Dmitry A. Kuminov, 12 years ago

Initially imported qt-all-opensource-src-4.5.1 from Trolltech.

File size: 1.7 KB
Line 
1isEmpty(QMAKE_QDBUSXML2CPP) {
2    win32:QMAKE_QDBUSXML2CPP = $$[QT_INSTALL_BINS]\qdbusxml2cpp.exe
3    else:QMAKE_QDBUSXML2CPP = $$[QT_INSTALL_BINS]/qdbusxml2cpp
4}
5
6for(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
16dbus_adaptor_header.commands = $$QMAKE_QDBUSXML2CPP -a ${QMAKE_FILE_OUT}: ${QMAKE_FILE_IN}
17dbus_adaptor_header.output_function = dbus_adaptor_header_output
18dbus_adaptor_header.name = DBUSXML2CPP ADAPTOR HEADER ${QMAKE_FILE_IN}
19dbus_adaptor_header.variable_out = DBUS_ADAPTOR_HEADERS
20dbus_adaptor_header.input = DBUS_ADAPTOR_LIST
21
22defineReplace(dbus_adaptor_header_output) {
23    return("$$lower($$section($$list($$basename(1)),.,-2,-2))_adaptor.h")
24}
25
26dbus_adaptor_source.commands = $$QMAKE_QDBUSXML2CPP -i ${QMAKE_FILE_OUT_BASE}.h -a :${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
27dbus_adaptor_source.output_function = dbus_adaptor_source_output
28dbus_adaptor_source.name = DBUSXML2CPP ADAPTOR SOURCE ${QMAKE_FILE_IN}
29dbus_adaptor_source.variable_out = SOURCES
30dbus_adaptor_source.input = DBUS_ADAPTOR_LIST
31
32load(moc)
33dbus_adaptor_moc.commands = $$moc_header.commands
34dbus_adaptor_moc.output = $$moc_header.output
35dbus_adaptor_moc.depends = $$dbus_adaptor_header.output
36dbus_adaptor_moc.input = DBUS_ADAPTOR_HEADERS
37dbus_adaptor_moc.variable_out = GENERATED_SOURCES
38dbus_adaptor_moc.name = $$moc_header.name
39
40defineReplace(dbus_adaptor_source_output) {
41    return("$$lower($$section($$list($$basename(1)),.,-2,-2))_adaptor.cpp")
42}
43
44QMAKE_EXTRA_COMPILERS += dbus_adaptor_header dbus_adaptor_source dbus_adaptor_moc
Note: See TracBrowser for help on using the repository browser.