MantisBT - CMake
View Issue Details
0012974CMakeModulespublic2012-02-18 07:212012-07-09 06:52
mtgrasse 
Clinton Stimpson 
normalmajoralways
closedfixed 
Windows
CMake 2.8.6 
 
0012974: FindQT3
find_package(Qt3 REQUIRED) always returns a QT_QTMAIN_LIBRARY and QT_LIBRARIES where the path to the qtmain library is /lib/qtmain.lib rather than ${QTDIR}/lib/qtmain.lib. Other QT libraries have the correct path.

I think this is because of the following code in FindQT3.cmake:
IF (WIN32)
  FIND_LIBRARY(QT_QTMAIN_LIBRARY qtmain
    "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/lib"
    "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/lib"
    "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/lib"
    "$ENV{ProgramFiles}/qt/lib"
    $ENV{QTDIR}/lib "C:/Program Files/qt/lib"
    DOC "This Library is only needed by and included with Qt3 on MSWindows. It should be NOTFOUND, undefined or IGNORE otherwise."
    )
ENDIF (WIN32)

Shouldn't there be "HINTS" or "PATHS" between "qtmain" and the first registry path? When I add HINTS into the call it starts working correctly.
No tags attached.
Issue History
2012-02-18 07:21mtgrasseNew Issue
2012-02-19 09:55Brad KingAssigned To => Clinton Stimpson
2012-02-19 09:55Brad KingStatusnew => assigned
2012-02-19 09:56Brad KingNote Added: 0028635
2012-02-20 15:01Clinton StimpsonNote Added: 0028660
2012-02-20 15:01Clinton StimpsonStatusassigned => resolved
2012-02-20 15:01Clinton StimpsonResolutionopen => fixed
2012-07-09 06:52David ColeNote Added: 0029980
2012-07-09 06:52David ColeStatusresolved => closed

Notes
(0028635)
Brad King   
2012-02-19 09:56   
The registry entries and QTDIR should be HINTS because they are computed from the system and the "Program Files" entries should be PATHS since they are hard-coded guesses.
(0028660)
Clinton Stimpson   
2012-02-20 15:01   
f506621 Fix paths/hints for finding qtmain.
(0029980)
David Cole   
2012-07-09 06:52   
Closing resolved issues that have not been updated in more than 4 months.