[CMake] Finding Qt3 moc and uic when Qt4 is installed in path

Filipe Sousa filipe at ipb.pt
Mon Apr 3 18:30:14 EDT 2006


On Monday 03 April 2006 23:07, Craig Bradney wrote:
> Hi,
>
> I'm wondering if anyone has a solution to the problem I'm facing right
> now... ie, on Gentoo Qt3's bin files are in /usr/qt/3/bin and Qt4 ones are
> in /usr/bin. FindQt3.cmake in cmake 2.3.4-20060317 is giving me these...
>
> /usr/qt/3 for $ENV{QTDIR}
> /usr/bin/moc for ${QT_MOC_EXECUTABLE}
> /usr/bin/uic for ${QT_UIC_EXECUTABLE}
> /usr/qt/3/lib/libqt-mt.so for ${QT_QT_LIBRARY}
> /usr/qt/3/include for ${QT_INCLUDE_DIR}
>
> The bins are called moc and uic as looked for by FintQt3.cmake.

Add NO_DEFAULT_PATH to FIND_PROGRAM() in FindQt3.cmake

$ cmake --help-command FIND_PROGRAM
       ...
       The reason the paths listed in the call to the command are searched
       last is that most users of CMake would expect things to be found first
       in the locations specified by their environment.  Projects may
       override this behavior by simply calling the command twice:

          FIND_PROGRAM(<VAR> NAMES name PATHS paths NO_DEFAULT_PATH)
          FIND_PROGRAM(<VAR> NAMES name)

       Once one of these calls succeeds the result variable will be set and
       stored in the cache so that neither call will search again.


-- 
Filipe Sousa
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/cmake/attachments/20060403/14ddf0fa/attachment.pgp


More information about the CMake mailing list