[CMake] Suggesting to FindQT4.cmake where to find QT4

Andreas Pakulat apaku at gmx.de
Mon May 25 17:38:50 EDT 2009


On 25.05.09 22:55:17, Jed Brown wrote:
> Andreas Pakulat wrote:
> 
> > Can you please elaborate, I have no idea what a/b or foo/bar refer to in
> > this example. However qmake knows exactly where the headers and libs
> > (and data) for the Qt its supposed to be used with are. So having the
> > right qmake first in your PATH is the right thing to setup. Either that
> > or look into the docs for FindQt4.cmake to find out the name for the
> > CMake variable that the module accepts for pointing to the right qmake
> > binary.
> 
> Suppose that package "foo" and "bar" both use the system that Qt uses.  Then
> I can set
> 
> PATH=/path/a:/path/b
> 
> and I will get /path/a/foo and /path/a/bar.  That's not what I wanted.  Of course setting
> 
> PATH=/path/b:/path/b
> 
> gives me /path/b/foo and /path/b/bar.  That's not what I wanted either.  How would I get
> /path/a/foo and /path/b/bar?  This should not be difficult.

You're absolutely right and thats why you can specify the exact qmake
executable to use (via cmake variable) in the case of FindQt4.cmake. 

However for a lot of cases adjusting PATH is easier (as this can be made
persistent or even be incorporated into env-setup-script) than
remembering to specify a CMake variable on each cmake invocation.

Andreas

-- 
Better hope the life-inspector doesn't come around while you have your
life in such a mess.


More information about the CMake mailing list