0
我想在cmake構建環境中將QGLViewer作爲外部源代碼安裝。這是我迄今試過的:使用Cmake的ExternalProject_Add安裝QGLViewer_Add
set(QGLViewer_VERSION 2.5.2)
set(QGLViewer_URL_REMOTE "http://www.libqglviewer.com/src/libQGLViewer-${QGLViewer_VERSION}.tar.gz")
ExternalProject_Add(QGLViewer
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/qglviewer
URL ${QGLViewer_URL_REMOTE}
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND qmake PREFIX="${CMAKE_CURRENT_BINARY_DIR}/external/qglviewer" QGLVIEWER_STATIC=yes
BUILD_COMMAND make
)
cmake工作得很好。
但是,運行make時,我得到一堆編譯錯誤。做的是找到安裝在我的系統,而不是構建項目目錄的那些標題:
make[4]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule.
Project MESSAGE: Warning: unknown QT: widgets
In file included from /usr/include/QGLViewer/manipulatedFrame.h:26:0,
from /usr/include/QGLViewer/manipulatedCameraFrame.h:26,
from /usr/include/QGLViewer/camera.h:26,
from /usr/include/QGLViewer/qglviewer.h:26,
from animation.h:23,
from animation.cpp:23:
/usr/include/QGLViewer/frame.h:139:3: error: ‘signals’ does not name a type
/usr/include/QGLViewer/frame.h:404:10: error: expected ‘:’ before ‘slots’
/usr/include/QGLViewer/frame.h:404:10: error: ‘slots’ does not name a type
NaN的