Results 1 to 10 of 10

Thread: qmake + subdirectories

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,371
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qmake + subdirectories

    Quote Originally Posted by niko View Post
    But "SUBDIRS += reader" in the root-pro is ignored.
    Because it only makes sense for "subdirs" template.

    so i have to go manually in alls subdirs and build them. How can I tell the root-pro it should behave like app *and* subdirs (or any other solution?)
    make two subdirectories and use one to build the library and the other to build the main app. Alternatively you might try this:

    TEMPLATE = subdirs
    SUBDIRS = mainapp.pro reader/reader.pro


    Quote Originally Posted by elcuco View Post
    is this portable to non gcc compilers?
    Partially. The "-L" and "-l" switches are portable but the library name might not be.

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: qmake + subdirectories

    How about simple .pri files for reader and writer?
    J-P Nurmi

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,371
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qmake + subdirectories

    The simplest way is to just put files into two directories and provide relative paths in the .pro file. No additional .pro or .pri files needed

  4. The following user says thank you to wysota for this useful post:

    niko (14th April 2007)

  5. #4
    Join Date
    Jan 2006
    Posts
    105
    Thanks
    21
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qmake + subdirectories

    Quote Originally Posted by wysota View Post
    The simplest way is to just put files into two directories and provide relative paths in the .pro file. No additional .pro or .pri files needed
    ok, thanks

    i will do it that way....

    niko

Similar Threads

  1. Flex, Bison and qmake
    By Hydragyrum in forum Qt Programming
    Replies: 5
    Last Post: 2nd May 2011, 15:52
  2. Qt Cryptographic Architecture
    By vermarajeev in forum Qt Programming
    Replies: 6
    Last Post: 9th February 2007, 13:15
  3. qmake to build both 32-bit and 64-bit
    By lni in forum Qt Programming
    Replies: 8
    Last Post: 12th December 2006, 19:35
  4. Replies: 5
    Last Post: 13th March 2006, 20:22
  5. linking user space and kernel space programs with qmake
    By zielchri in forum Qt Programming
    Replies: 9
    Last Post: 8th March 2006, 23:11

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.