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. Qmake QMAKE_SUBSTITUTES behaviour with PWD for out-of-source-builds
Forum Updated to NodeBB v4.3 + New Features

Qmake QMAKE_SUBSTITUTES behaviour with PWD for out-of-source-builds

Scheduled Pinned Locked Moved Qt Creator and other tools
1 Posts 1 Posters 4.2k 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.
  • TheBadgerT Offline
    TheBadgerT Offline
    TheBadger
    wrote on last edited by
    #1

    Hi,

    I am using the guide to make global variables in subdirs projects from "here":http://qt-project.org/wiki/QMake-top-level-srcdir-and-builddir.

    This is working but I need to run qmake about 3 times after each other for out-of-source-builds to get the project to build correctly.

    I have done some searching and came to the following strange behaviour using the *.in file (not sure it what I am doing is even supported). The following code is inside my .qmake.cache.in file:
    @
    message(-- PWD IS: $$PWD)
    message(-- OUT_PWD IS: $$OUT_PWD)

    TOP_DIR=$$PWD
    message(TOP_DIR: $$TOP_DIR)
    TOP_OUT_DIR=$$OUT_PWD
    message(TOP_OUT_DIR: $$TOP_OUT_DIR)--
    @

    When I run qmake for the first time on the project I get the following output (through Qt Creator):
    @
    Project MESSAGE: -- PWD IS: Z:/Path/To/My/Project
    Project MESSAGE: -- OUT_PWD IS: Z:/Path/To/My/Shadow/build-Qt_4_8_1_mingw-Debug/.
    Project MESSAGE: TOP_DIR:
    Project MESSAGE: TOP_OUT_DIR:
    @

    Why is my local variables empty but the message reports that the original variables is correct?

    After about the 3rd time that I run qmake on the project the output is:
    @
    Project MESSAGE: -- PWD IS: Z:/Path/To/My/Project
    Project MESSAGE: -- OUT_PWD IS: Z:/Path/To/My/Shadow/build-Qt_4_8_1_mingw-Debug/.
    Project MESSAGE: TOP_DIR: Z:/Path/To/My/Project
    Project MESSAGE: TOP_OUT_DIR: Z:/Path/To/My/Shadow/build-Qt_4_8_1_mingw-Debug/.
    @

    Could this be a bug in Qt 4.8.1?

    PS:
    In "this":http://qt-project.org/forums/viewthread/21145 post Lukas Geyer did say the following:

    [quote author="Lukas Geyer" date="1350393883"]
    Interestingly enough $$PWD did not work for me in the qmake.cache.in (was empty), but $$PRO_FILE_PWD did.
    [/quote]
    but that is about all that I could find on the subject, no actual solution for OUT_PWD


    Check out my SpellChecker Plugin for Qt Creator @ https://github.com/CJCombrink/SpellChecker-Plugin

    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