Results 1 to 2 of 2

Thread: QtCreator project multiple targets

  1. #1
    Join Date
    Mar 2009
    Posts
    39
    Thanks
    14
    Qt products
    Qt4
    Platforms
    Windows

    Default QtCreator project multiple targets

    I think this one is very elemental but I can not catch my misunderstood.
    I just want to have a project with different targets, debug and release to develop under QtCreator. If I have this pro file

    Qt Code:
    1. QT += core gui
    2.  
    3. TARGET = WTest
    4. TEMPLATE = app
    5.  
    6.  
    7. SOURCES += main.cpp\
    8. mainwindow.cpp
    9.  
    10. HEADERS += mainwindow.h
    11.  
    12. FORMS += mainwindow.ui
    13.  
    14. win32{
    15.  
    16. debug {
    17. OBJECTS_DIR=T:/Tmp/ObjsD
    18. }
    19. release {
    20. OBJECTS_DIR=T:/Tmp/ObjsR
    21. }
    22. }
    To copy to clipboard, switch view to plain text mode 
    And I select the Debug target, it is, souldn't it write the objects to the t:/Tmp/ObjsD directory? (it writes to ObjsR actually)

  2. #2
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: QtCreator project multiple targets

    Try this way:
    Qt Code:
    1. win32{
    2. build_pass:CONFIG(debug, debug|release){
    3. OBJECTS_DIR=T:/Tmp/ObjsD
    4. } else {
    5. OBJECTS_DIR=T:/Tmp/ObjsR
    6. }
    7. }
    To copy to clipboard, switch view to plain text mode 

  3. The following user says thank you to stampede for this useful post:

    thru (17th March 2011)

Similar Threads

  1. Building multiple targets on one machine?
    By Reliance in forum Qt Tools
    Replies: 0
    Last Post: 9th January 2011, 16:11
  2. Replies: 4
    Last Post: 2nd July 2010, 22:16
  3. Replies: 1
    Last Post: 18th August 2009, 15:18
  4. Multiple Targets with QMAKE
    By nightghost in forum Qt Tools
    Replies: 1
    Last Post: 7th June 2009, 10:11
  5. Project flags in QtCreator
    By HyperB in forum Qt Tools
    Replies: 1
    Last Post: 14th May 2009, 13:38

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.