Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Conditional include of different .pri files
Forum Updated to NodeBB v4.3 + New Features

Conditional include of different .pri files

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
2 Posts 2 Posters 175 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.
  • P Offline
    P Offline
    ptrckrhn
    wrote on last edited by
    #1

    I'm trying to include different .pri files based on CONFIG containing different values.

    CONFIG(opt1) {
    	include(path/to/opt1.pri)
    }
    CONFIG(opt2) {
    	include(path/to/opt2.pri)
    }
    

    I have confirmed that CONFIG only contains one of the values. Still Qt Creator shows both .pri files in the project tree.
    Searching the forum, I found this topic with a very similar problem. There SGaist replied:

    "How do you know it's always included ?
    If it's because Qt Creator shows the file, then it's unrelated to it's inclusion or not in your .pro file."

    I could confirm that indeed only one of the .pri files is actually included, but both are shown in the project tree.
    This seems a little unintuitive to me. Should the inactive include not at least be grayed out, as is done with inactive source/header files?

    1 Reply Last reply
    0
    • Christian EhrlicherC Christian Ehrlicher moved this topic from General and Desktop on
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      You might want to make a feature request for that suggestion.

      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