[Qt-interest] question about message output of PRO file

Vincent Cai wcai at cypress.com
Tue Nov 1 10:37:28 CET 2011


Hi,

         I modified the *.pro file to generate target name based on CONFIG(debug/release).
         If debug, the target name should be Applicationd
    If release, the target name should be Application

TEMPLATE += fakelib
TARGET_NAME = $$qtLibraryTarget(Application)
TEMPLATE -= fakelib
TARGET = Applicationd #$$TARGET_NAME
message(TARGET_NAME=$$TARGET_NAME)

Above code can generate the target properly.
But I can't debug my project, and the Qt Creator report that /debug/application can't be found.
[cid:image001.png at 01CC98BC.5C895740]
    It shows that the Qt Creator tried to run Application.exe in debug mode instead of Applicationd.exe.
    I can also find that
[cid:image002.png at 01CC98BC.ED4E3160]

    Then I tried printing out the TARGET_NAME variable, and I can get 3 outputs for only 1 build,
    Which shows that the last value for TARGET_NAME is Application.
Project MESSAGE: TARGET_NAME=Application
Project MESSAGE: TARGET_NAME=Applicationd
Project MESSAGE: TARGET_NAME=Application

    Why I get 3 outputs for only 1 build?

Thanks,
Vincent.

________________________________
This message and any attachments may contain Cypress (or its subsidiaries) confidential information. If it has been received in error, please advise the sender and immediately delete this message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20111101/d33b9e8f/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 24112 bytes
Desc: image001.png
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20111101/d33b9e8f/attachment.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 13179 bytes
Desc: image002.png
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20111101/d33b9e8f/attachment-0001.png 


More information about the Qt-interest-old mailing list