CMake cannot find Qt4

Michael Dickens michaelld at macports.org
Fri Nov 6 07:06:23 PST 2015


Set the environment variable:
{{{
QMAKE=/opt/local/libexec/qt4/bin/qmake
}}}
before running cmake.

If you're inside a Portfile, then just do:
{{{
PortGroup qt4 1.0
}}}
somewhere before the cmake command.

- MLD

On Fri, Nov 6, 2015, at 09:26 AM, Davide Liessi wrote:
> I'm trying to build a project that requires Qt4 and uses CMake.
> When I run cmake I get the following error:
> 
> CMake Error at /opt/local/share/cmake-3.3/Modules/FindQt4.cmake:1324
> (message):
>   Found unsuitable Qt version "" from NOTFOUND, this code requires Qt 4.x
> 
> Any hint on how to solve this?
> 
> The versions of the ports are:
> $ port installed cmake qt4-mac
> The following ports are currently installed:
>   cmake @3.3.2_1 (active)
>   qt4-mac @4.8.7_2 (active)


More information about the macports-users mailing list