[Qt-interest] Best way to deal with library dependancies with qmake

Bob Hood bhood2 at comcast.net
Mon Sep 14 19:20:52 CEST 2009


You could use an environment variable to point to the boost
installation.  Something like:

    exists ( $$quote($$(BOOST_INSTALL)/bind.hpp) )

That should work under all platforms.



Evan Teran wrote:
> So I have a project which depends on an external library. Is there a best 
> practice for dealing with this? Is there any form of qmake time detection of 
> dependencies available?
>
> I suppose I could do something like this (my external dependency is boost):
>
>  exists( /usr/include/boost/bind.hpp ) {
>        message( "Required boost header not found, please check your 
> installation" )
>  }
>
> The problem with this is that I would need to figure out where the header 
> could be installed (not just /usr/include, since I plan to support windows 
> as well).
>
> option B is of course to make a "configure" script which do some probing and 
> tweaks the .pro file (or could just generate a .pri file for inclusion, same 
> difference really).
>
> Is there something better or are these my options?
>
> Evan
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>

-- 

Render me gone,                       |||
Bob                                 ^(===)^
---------------------------------oOO--(_)--OOo---------------------------------
      "Magic" and "Miracles" are registered trademarks of Ignorance, Inc.
                              All Rights Reserved.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090914/4356d812/attachment.html 


More information about the Qt-interest-old mailing list