Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Make LIBS dependency avaible for all SUBDIRS *.pro file
Qt 6.11 is out! See what's new in the release blog

Make LIBS dependency avaible for all SUBDIRS *.pro file

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 4 Posters 1.0k Views 2 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.
  • D Offline
    D Offline
    dridk
    wrote on last edited by
    #1

    Hi,
    I have a project "test" with many test units (testX.pro) as SUBDIRS.

    myproject 
      - test
         - test1/test1.pro
         - test2/test2.pro
         - test3/test3.pro
         test.pro 
    

    I would like to avoid adding LIBRARY dependency in each testX.pro file .
    Is is possible to add something in the root test.pro to have INCLUDE_PATH and LIBS avaible for all testX.pro file ?

    Nothing in Biology Makes Sense Except in the Light of Evolution

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

      Hi,

      IIRC. you can try using a qmake cache file.

      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
      2
      • T Offline
        T Offline
        TobbY
        wrote on last edited by
        #3

        Hi @dridk ,
        Create config.pri file. There you can specify all your dependencies. And add config to your pro.
        include(config.pri)

        1 Reply Last reply
        1
        • D dridk

          Hi,
          I have a project "test" with many test units (testX.pro) as SUBDIRS.

          myproject 
            - test
               - test1/test1.pro
               - test2/test2.pro
               - test3/test3.pro
               test.pro 
          

          I would like to avoid adding LIBRARY dependency in each testX.pro file .
          Is is possible to add something in the root test.pro to have INCLUDE_PATH and LIBS avaible for all testX.pro file ?

          K Offline
          K Offline
          koahnig
          wrote on last edited by
          #4

          @dridk

          I am using a file ".qmake.conf" to place common statements to be used in all (sub)projects in sub-folders. There must be a thread started by me with a similar topic around. I cannot find it anymore.

          IIRC @SGaist suggested also there the cache file, which did not work as expected, but .qmake.conf did. Probably I have provided some reasoning in the sequence of my thread.

          Vote the answer(s) that helped you to solve your issue(s)

          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