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. Which variables are automatically generated by qmake? E.g. xxxxx_build_dir
Forum Update on Monday, May 27th 2025

Which variables are automatically generated by qmake? E.g. xxxxx_build_dir

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 592 Views
  • 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.
  • DiracsbracketD Offline
    DiracsbracketD Offline
    Diracsbracket
    wrote on last edited by Diracsbracket
    #1

    Hi,
    I am trying to understand how qmake works.

    In the .pro file of the spectrum example, there is a variable spectrum_build_dir which is explicitly defined for macx and win32 scopes, but not for Unix/Linux.

    For Linux, this variable must therefore be automatically generated , based on the name of the TARGET? If so, where can I find the documentation about these automatically generated/derived variables?

    Thanks!

    jsulmJ 1 Reply Last reply
    0
    • DiracsbracketD Diracsbracket

      Hi,
      I am trying to understand how qmake works.

      In the .pro file of the spectrum example, there is a variable spectrum_build_dir which is explicitly defined for macx and win32 scopes, but not for Unix/Linux.

      For Linux, this variable must therefore be automatically generated , based on the name of the TARGET? If so, where can I find the documentation about these automatically generated/derived variables?

      Thanks!

      jsulmJ Online
      jsulmJ Online
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Diracsbracket You can use message() function in pro file to print the value of a variable:

      spectrum_build_dir($$spectrum_build_dir)
      

      spectrum_build_dir does not sound like a variable automatically generated by QMake, I guess it is something defined in the pro file for that particular project. If it is not set for Linux then it will be an empty string (print its value using message() to check).

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2
      • DiracsbracketD Offline
        DiracsbracketD Offline
        Diracsbracket
        wrote on last edited by
        #3

        Thanks jsulm!
        I didn't consider the possibility that a variable may just not be set.
        The message($$spectrum_build_dir) trick confirmed that the variable is empty indeed.

        Thanks again!

        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