Results 1 to 2 of 2

Thread: RFC: A Complex(er) QMake Template

  1. #1
    Join Date
    Jan 2006
    Posts
    128
    Thanked 28 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Post RFC: A Complex(er) QMake Template

    Hi,

    Since I sometimes like to work a whole lot, only so that I could work a little bit less later, I started playing with qmake and started to build some features and includes that allow me to work the way I like :-)

    The result, after I now ripped it out of my project and build a little example template, can be found here. (Tested Qt = 4.2)

    I probably have to admit that I am a reuse-neurotic, and it is very hard for me to write stuff that is only functional for a specific case. This often results in me writing libraries for stuff that could (but mostly are not :-/) be used again. The template allows this side by side development of the libs and the app without thinking, by using a few nice feature of qmake

    a) .qmake.cache
    At the root of the project the ".qmake.cache" grounds the project to a specific directory. Since qmake searches for this file and then loads it, it allows us to load a few default values. Since the directory the .qmake.cache is found in is also included in the search part for features, it at the same time allows us to add some nice features. (more on that later)

    b) features
    I created two little features, one that keeps all the temporary objects safely stacked away in a central place (separated by debug/release if you so care) since I really do not like the objects to lie around everywhere. And another that copies the headers that are specified by the variable PUBLIC_HEADERS into the directory $$includedir/$$targetname

    The template contains a little example setup using a sub-project (a library) and a mainproject (an app) that can be very easily developed concurrently, as they check their dependencies automatically (tests are integrated into the template for good measure).


    What do you guys/gals think?
    Comments?
    Patches? ;-)


    P.S. Since I do not trust "public domain" I made sure every file sports a BSD license so it can be used -- Overkill? ;-)

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

    sunil.thaha (9th January 2007)

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

    Default Re: RFC: A Complex(er) QMake Template

    I have a comment - what does it actually do? There are lots of files in the archive, but none of them are really explained... You should at least attach some instructions on how to use it...

Similar Threads

  1. Flex, Bison and qmake
    By Hydragyrum in forum Qt Programming
    Replies: 5
    Last Post: 2nd May 2011, 16:52
  2. qmake failure for SUBDIRS template on OSX
    By lonejedi in forum Newbie
    Replies: 3
    Last Post: 24th May 2010, 01:02
  3. qmake to build both 32-bit and 64-bit
    By lni in forum Qt Programming
    Replies: 8
    Last Post: 12th December 2006, 20:35
  4. problem using template
    By mickey in forum General Programming
    Replies: 6
    Last Post: 18th November 2006, 16:57
  5. linking user space and kernel space programs with qmake
    By zielchri in forum Qt Programming
    Replies: 9
    Last Post: 9th March 2006, 00: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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.