Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Reference generated dbus interface files.

Reference generated dbus interface files.

Scheduled Pinned Locked Moved Installation and Deployment
4 Posts 2 Posters 1.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mcrahr
    wrote on last edited by
    #1

    HI I have the following setup.

    @TEMPLATE = subdirs
    CONFIG+=ordered
    SUBDIRS =
    src
    app
    mqttTest

    app.depends = src
    mqttTest.depends = src

    OTHER_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 += network

    CONFIG += console
    CONFIG -= app_bundle

    TEMPLATE = app

    SOURCES += main.cpp

    LIBS += -L../src -lmyapp
    @

    Br
    Michael

    Br.
    Micahel R

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

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

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mcrahr
        wrote on last edited by
        #3

        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

        Br.
        Micahel R

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          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.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved