MantisBT - CMake
View Issue Details
0013427CMakeCMakepublic2012-07-19 23:032012-12-03 07:46
Randy O'Reilly 
Clinton Stimpson 
highmajoralways
closedno change required 
Apple MacOS X10.7.4
CMake 2.8.8 
 
0013427: FIND_LIBRARY fails to find _debug libraries in FindQt4 on Mac
The following lines of code are used to find the QtCore library in release and debug formats -- the release version succeeds, while the debug fails (sets to -NOTFOUND), despite the fact that QtCore_debug exists, as the list shows. I tried all manner of copying things directly into the frameworks dir instead of having symlinks, and creating all the other versions of the names, moving the other things named _debug out of the way, etc. nothing seemed to work. totally bizarre! hopefully there is a fix.

As a work-around I just aded QtCore to the NAMES list for the debug case and that works given that I know I have debug libraries, but obviously is not a good general solution. Thanks for an excellent system!

    FIND_LIBRARY(QT_QTCORE_LIBRARY_RELEASE
                 NAMES QtCore${QT_LIBINFIX} QtCore${QT_LIBINFIX}4
                 HINTS ${QT_LIBRARY_DIR_TMP}
                 NO_DEFAULT_PATH
        )
    FIND_LIBRARY(QT_QTCORE_LIBRARY_DEBUG
                 NAMES QtCore${QT_LIBINFIX}_debug QtCore${QT_LIBINFIX}d QtCore${QT_LIBINFIX}d4
                 HINTS ${QT_LIBRARY_DIR_TMP}
                 NO_DEFAULT_PATH
        )


52 shadow:.../Frameworks/QtCore.framework#list
total 40
drwxrwxr-x 10 root admin 340 Jul 19 20:59 .
drwxr-xr-x 58 root wheel 1972 Jul 19 03:26 ..
drwxrwxr-x 3 root admin 102 Jul 19 11:57 Contents
lrwxr-xr-x 1 504 wheel 18 Jul 19 02:07 Headers -> Versions/4/Headers
lrwxr-xr-x 1 504 wheel 17 Jul 19 02:07 QtCore -> Versions/4/QtCore
-rw-rw-r-- 1 root admin 989 May 7 21:42 QtCore.prl
lrwxr-xr-x 1 504 wheel 23 Jul 19 11:57 QtCore_debug -> Versions/4/QtCore_debug
drwxrwxr-x 3 root admin 102 Jun 15 2010 QtCore_debug.dSYM
-rw-rw-r-- 1 root admin 1006 May 7 21:22 QtCore_debug.prl
drwxrwxr-x 5 root admin 170 Jul 19 11:57 Versions
No tags attached.
Issue History
2012-07-19 23:03Randy O'ReillyNew Issue
2012-07-20 00:02Clinton StimpsonNote Added: 0030091
2012-07-20 00:02Clinton StimpsonStatusnew => resolved
2012-07-20 00:02Clinton StimpsonResolutionopen => no change required
2012-07-20 00:02Clinton StimpsonAssigned To => Clinton Stimpson
2012-12-03 07:46David ColeNote Added: 0031802
2012-12-03 07:46David ColeStatusresolved => closed

Notes
(0030091)
Clinton Stimpson   
2012-07-20 00:02   
You should read up on how to do debugging with Qt frameworks.
http://qt-project.org/doc/qt-4.8/debug.html [^]
(0031802)
David Cole   
2012-12-03 07:46   
Closing resolved issues that have not been updated in more than 4 months.