Results 1 to 9 of 9

Thread: How to determine target architecture in qmake project file?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #8
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Wiki edits
    17

    Default Re: How to determine target architecture in qmake project file?

    You use a subdirs project. For a simple example project.pro:
    Qt Code:
    1. TEMPLATE = subdirs
    2. SUBDIRS = foo bar app
    3. CONFIG += ordered # makes sure libs foo and bar are built before app
    To copy to clipboard, switch view to plain text mode 
    with a source tree like:
    Qt Code:
    1. - project.pro
    2. + foo
    3. - foo.pro
    4. - a.cpp
    5. - etc...
    6. + bar
    7. - bar.pro
    8. - b.cpp
    9. - etc...
    10. + app
    11. - app.pro
    12. - main.cpp
    13. - mainwindow.cpp
    14. - etc...
    To copy to clipboard, switch view to plain text mode 
    The app.pro could reference the libraries:
    Qt Code:
    1. TEMPLATE = app
    2. TARGET = MyCoolProgram
    3. INCLUDEPATH += ../foo ../bar
    4. LIBS += -L../foo -lfoo
    5. LIBS += -L../bar -lbar
    6. ...
    To copy to clipboard, switch view to plain text mode 
    and a library PRO would look like:
    Qt Code:
    1. TEMPLATE = lib
    2. TARGET = foo
    3. SOURCES += ...
    4. HEADERS += ...
    To copy to clipboard, switch view to plain text mode 

    Done from memory, check the qmake manual.

  2. The following user says thank you to ChrisW67 for this useful post:

    Infinity (27th December 2013)

Similar Threads

  1. Share my qmake project file
    By ibingow in forum Qt Tools
    Replies: 0
    Last Post: 30th August 2011, 09:19
  2. Replies: 1
    Last Post: 3rd December 2009, 23:34
  3. qmake can't process project file on windows
    By s-troz in forum Qt Programming
    Replies: 3
    Last Post: 25th October 2008, 14:51
  4. making qmake create VisualStudio console app project file?
    By akos.maroy in forum Qt Programming
    Replies: 2
    Last Post: 18th August 2008, 14:45
  5. qmake: detecting x86_64 architecture?
    By akos.maroy in forum Qt Programming
    Replies: 3
    Last Post: 2nd August 2008, 11:26

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
  •  
Qt is a trademark of The Qt Company.