在函数中findQt4.cmake
:
FIND_LIBRARY(QT_QTCORE_LIBRARY_RELEASE
NAMES QtCore QtCore4
HINTS ${QT_LIBRARY_DIR_TMP}
)
如果我打印:
MESSAGE("HINT PATH " ${QT_LIBRARY_DIR_TMP})
我会得到:
~/dev/Libraries/Qt4.8.0/lib
在这个目录中有:~/dev/Libraries/Qt4.8.0/lib$ ls -all libQtCore*
我有:
-rw-r--r-- 1 abc abc 950 Nov 30 13:08 libQtCore.la
-rw-r--r-- 1 abc abc 942 Nov 30 13:07 libQtCore.prl
lrwxrwxrwx 1 abc abc 18 Nov 30 13:07 libQtCore.so -> libQtCore.so.4.8.0
lrwxrwxrwx 1 abc abc 18 Nov 30 13:08 libQtCore.so.4 -> libQtCore.so.4.8.0
lrwxrwxrwx 1 abc abc 18 Nov 30 13:08 libQtCore.so.4.8 -> libQtCore.so.4.8.0
-rwxr-xr-x 1 abc abc 2697932 Nov 30 13:08 libQtCore.so.4.8.0
但是为什么FIND_LIBRARY
函数返回:QT_QTCORE_LIBRARY_RELEASE = NOT FOUND?
甚至,如果我这样做,也没有结果:
FIND_LIBRARY(QT_QTCORE_LIBRARY_RELEASE
NAMES libQtCore.so
HINTS ${QT_LIBRARY_DIR_TMP}
)