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. qmake: subdirs with different configs
Qt 6.11 is out! See what's new in the release blog

qmake: subdirs with different configs

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 700 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.
  • G Offline
    G Offline
    gserm
    wrote on last edited by
    #1

    Hi, I'm using Qt4.8.7 on Windows 10. I have two qmake project files, project1.pro and project2.pro, each located in each own directory (project1 and project2). Both projects can take various custom optional CONFIG arguments, say arg1, arg2 and arg3.

    I'd now like to create a master project file which can pass different CONFIG arguments to each project. I've tried this:

    TEMPLATE = SUBDIRS
    
    SUBDIRS = project1 project2
    
    project1.CONFIG += arg2
    project2.CONFIG += arg1 arg3
    

    but unfortunately the CONFIG arguments are completely ignored in the resulting Makefiles for the two individual projects. Is there a way to achieve what I'm looking for?

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

      Hi,

      I am not aware of a direct way for that.

      One thing you could do is use a .qmake.conf file with a custom variable for each of your project and then in the project .pro file you'll parse the corresponding variable and append the content to the original 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