Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Reference generated dbus interface files.

    Installation and Deployment
    2
    4
    936
    Loading More Posts
    • 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
      mcrahr last edited by

      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 Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        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 Reply Quote 0
        • M
          mcrahr last edited by

          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 Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            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 Reply Quote 0
            • First post
              Last post