Results 1 to 2 of 2

Thread: qmake exists() function

  1. #1
    Join Date
    Apr 2008
    Posts
    104
    Thanks
    8
    Thanked 7 Times in 7 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default qmake exists() function

    Hello! I have Qt 4.4.3 on Linux. And I've discover a strange thing. The following code in my .pro-file doesn't work right anymore:

    QMake Code:
    1. exists ("/usr/include/aspell.h")
    2. {
    3. message( "ASpell enabled" )
    4. LIBS += -laspell
    5. DEFINES += ASPELL_ENABLE
    6. }
    To copy to clipboard, switch view to plain text mode 

    As far I see, currently exists() returns true in ANY case - with aspell.h presented or not. The same thing for other files those I'm trying to check:

    QMake Code:
    1. exists (subpop.h)
    2. {
    3. message( "foo bar is here" )
    4. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by wysota; 2nd January 2009 at 23:10. Reason: Changed [code] to [highlight]

  2. #2
    Join Date
    Apr 2008
    Posts
    104
    Thanks
    8
    Thanked 7 Times in 7 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qmake exists() function

    update: it works fine when the "{" is after the condition, i.e.:
    QMake Code:
    1. exists("/usr/include/aspell.h") {
    To copy to clipboard, switch view to plain text mode 
    Last edited by wysota; 2nd January 2009 at 23:11. Reason: Changed [code] to [highlight]

Similar Threads

  1. QPSQL problem
    By LoneWolf in forum Installation and Deployment
    Replies: 60
    Last Post: 4th November 2009, 14:22
  2. QPSQL driver in windows
    By brevleq in forum Installation and Deployment
    Replies: 31
    Last Post: 14th December 2007, 12:57
  3. how to add static library into qmake
    By Namrata in forum Qt Tools
    Replies: 1
    Last Post: 20th November 2007, 17:33
  4. KDE/QWT doubt on debian sarge
    By hildebrand in forum KDE Forum
    Replies: 13
    Last Post: 25th April 2007, 06:13
  5. use qpsql
    By raphaelf in forum Installation and Deployment
    Replies: 34
    Last Post: 22nd August 2006, 12:52

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.