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. PRI files and indirect dependencies
Forum Updated to NodeBB v4.3 + New Features

PRI files and indirect dependencies

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
2 Posts 2 Posters 605 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.
  • C Offline
    C Offline
    cauri
    wrote on last edited by
    #1

    Hi all,

    in my repo I have tens of different libraries. When I add a new dependency in one of them I have to modify all the applications and libraries that depended on them, all the .pro files. It's so time consuming, I don't know if there is a better way, but now I'm trying to create a .pri for each library in order to make this process easier in some way. During this process I've found the following issue:

    I have created a qmake function that includes a .pri file:

    defineTest(add_my_lib) {
        lib_name = $$1
        message("adding lib$$lib_name ")
        include(mypath/$${lib_name}.pri)
    }
    

    in this .pri file I have added lines to include a library:

    INCLUDEPATH += /pathToLib/src
    LIBS += -L/pathToLib/lib -lmylibname
    

    The problem is that for some reason in the .pro that calls add_my_lib the INCLUDEPATH gets reset. It looks like INCLUDEPATH is a variable that cannot be modified by functions. Or better, it can inside the function but the values do not get propagated in the caller .pro file.

    Is this the correct behavior or am I doing something wrong?

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

      Hi,

      Please don't post the same question in multiple sub-forums. One is enough.

      You had an answer in your other thread.

      Closing this one

      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
      1

      • Login

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