Reference generated dbus interface files.
-
HI I have the following setup.
@TEMPLATE = subdirs
CONFIG+=ordered
SUBDIRS =
src
app
mqttTestapp.depends = src
mqttTest.depends = srcOTHER_FILES +=
defaults.pri@
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.
@
include(../defaults.pri)
QT += core
QT += dbus
QT += networkCONFIG += console
CONFIG -= app_bundleTEMPLATE = app
SOURCES += main.cpp
LIBS += -L../src -lmyapp
@Br
Michael -
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.Br.
Michael -
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.