[CMake] FindQt4 for Qt 4.2.0 does not recognise debug-libs

clinton at elemtech.com clinton at elemtech.com
Thu Oct 19 11:27:56 EDT 2006


> Filipe Sousa schrieb:
> > Jens wrote:
> >> Hi,
> >>
> >> FindQt4.cmake does not handle the new filenames of Qt-4.2.0-debug-libs.
> >>
> >> I compiled Qt 4.2.0 from source and see that the debug-libs changed
> >> their names to "libQt*.so.4.2.0.debug" on linux.
> >
> > These are not debug libraries. Qt 4.2.0 by default splits the debug info
> > from libraries with objcopy:
> >
> >  objcopy --only-keep-debug "$targ" "$targ.debug" && objcopy
> > --strip-debug "$targ" && objcopy --add-gnu-debuglink="$targ.debug"
> > "$targ"
> >
> > AFAIK qt 4.2.0 does not generate debug and release libs at the same sime
>
> That?s interesting and sound like a real good idea. But that still means
> there is a fix for FoundQt4.cmake needed.
>
> If I understand the mails at
> http://lists.trolltech.com/qt4-preview-feedback/2006-09/thread00083-0.html
> correctly, the QT_*_LIBRARY?s and QT_*_LIBRARY_DEBUG?s from
> FindQt4.cmake must be the same if QTVERSION in FindQt.cmake matches "4.2.*"
>
> Is that correct?
>
> Greetings
> Jens

If I understand you correctly, I don't think we need to fix FindQt4.cmake.

I don't think QT_*_LIBRARY_DEBUG should have the same value as QT_*_LIBRARY 
(for Qt 4.2).

In Qt 4.2 and on Windows, the QT_*_LIBRARY_DEBUG variables still be used to 
link the proper Qt libraries for a debug build.

I've only seen the _DEBUG suffix is for those that have separate debug 
libraries.  For example, on Windows, you can have python24 and python24_d.  
If python24_d doesn't exist, PYTHON_DEBUG_LIBRARY isn't set to the value of 
PYTHON_LIBRARY, even on Unix platforms.

Clint


More information about the CMake mailing list