[CMake] Finding Debug Versions of Qt4 Frameworks on OS X
Michael Wild
themiwi at gmail.com
Mon Jul 19 16:28:09 EDT 2010
On 19. Jul, 2010, at 19:59 , Michael Jackson wrote:
> Wonder why I have never seen this before but with CMake 2.8.x and a Qt4 based project on OS X when finding the Qt4 frameworks only the release version is found, ie, the Debug version that is located inside the framework is NOT found by default.
> My question is: is this a bug, a "feature" or should I be using the DYLD_IMAGE_SUFFIX environment variable instead?
>
> The offending code is in the FindQt4.cmake file around lines 772:
>
> FIND_LIBRARY(QT_${_upper_qt_module}_LIBRARY_DEBUG
> NAMES ${QT_MODULE}${QT_LIBINFIX}_debug ${QT_MODULE}${QT_LIBINFIX}d ${QT_MODULE}${QT_LIBINFIX}d4
> PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH
> )
>
> I would imagine that the cmake code above is going to try and find QtCore_debug.framework and NOT QtCore.framework/versions/current/QtCore_debug
>
> Thoughts?
> ___________________________________________________________
> Mike Jackson www.bluequartz.net
> Principal Software Engineer mike.jackson at bluequartz.net
> BlueQuartz Software Dayton, Ohio
Reading http://doc.trolltech.com/4.6/mac-differences.html#qt-libraries-as-frameworks seems to indicate that either setting DYLD_IMAGE_SUFFIX is one way to go, renaming the embedded library another. Not sure it would be all that desirable to explicitly link against the debug versions on Mac OS X...
Michael
More information about the CMake
mailing list