Reference generated dbus interface files.

  • HI I have the following setup.

    @TEMPLATE = subdirs

    app.depends = src
    mqttTest.depends = src

    e.g Using a subdir templeate.

    Now the problem is that in the src, I have all the logic stuff, compilen into a lib, no problem, except for this
    @DBUS_INTERFACES += mpreis.xml@

    This will generate header and source files but in the build directory (Im-- using shadow build)
    meaning that the header files are not in the source src directory.
    Now this is not a problem when compiling the src directory, but when compiling the app directory, that are using the lib compiled in the scr, it will be missing the autogenerated dbus files.

    What would be the best solution ?
    For now I have moved the
    @DBUS_INTERFACES += mpreis.xml@

    --into the default.pri file, meaning that it will autogenerate correct make file for both src and app subdir.

    pro file for the app dir.
    QT += core
    QT += dbus
    QT += network

    CONFIG += console
    CONFIG -= app_bundle

    TEMPLATE = app

    SOURCES += main.cpp

    LIBS += -L../src -lmyapp


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    You can add the path where you get the generated header to the INCLUDEPATH variable.

    Hope it helps

  • Hi mr. SGaist

    It is not as simple as that, unless I hardcode the path.
    everything is autogenerated, And I would like not to hardcode anything, but use vars.


  • Lifetime Qt Champion

    You can use $$OUT_PWD to get the current build directory then it's only a matter of adding the path part where you have your header generated.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.