[CMake] Finding Qt4 binaries under Windows

Michael Jackson mike.jackson at bluequartz.net
Fri Aug 21 16:22:32 EDT 2009


YOU are the one who compiled it in C:\Qt\4.5.1 according to your  
original post. I am simply making you aware of the error.

On Fri, Aug 21, 2009 at 8:31 PM, Sebastian
Schuberth<sschuberth at gmail.com> wrote:
> Hi,
>
> I'm trying to use CMake for a Windows application that links against  
> Qt 4.
> I've installed Qt 4.5.1 from sources (unzipped to the standard  
> location
> C:\Qt\4.5.1) and compiled it myself.

So, if you compiled to C:\Qt\4.5.1 then you have a couple of options:

set QTDIR to C:\Qt\4.5.1 in the environment variables.

OR

find_package(Qt4 PATHS "C:/Qt/4/.5.1") like Pau suggested.

If you don't like the version number on there then recompile Qt 4.5.1  
so that it has a path of C:\Qt and NOT C:\Qt\4.5.1

Understand?

--
Mike Jackson <www.bluequartz.net>

On Aug 21, 2009, at 4:01 PM, Sebastian Schuberth wrote:

> On 21.08.2009 21:14, Michael Jackson wrote:
>
>> set QTDIR to C:\Qt\4.5.1
>
> Thanks, but that's out of the question, as I'd like to have it  
> working independent of the actual Qt4 version.
>
> -- 
> Sebastian Schuberth
>


More information about the CMake mailing list