- Unknown Cmake command "QT4_WRAP_CPP"
这是因为你的CmakeLists.txt文件中qt的版本不正确。
解决方法:
在CmakeLists.txt 文件中所有Qt4改成你自己的版本,比如Qt5等。 - By not providing “FindQt5.cmake” in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by “Qt5”, but
CMake did not find one.
Could not find a package configuration file provided by “Qt5” with any of
the following names:
Qt5Config.cmake
qt5-config.cmake
Add the installation prefix of “Qt5” to CMAKE_PREFIX_PATH or set “Qt5_DIR”
to a directory containing one of the above files. If “Qt5” provides a
separate development package or SDK, be sure it has been installed.
解决方法:进入CmakeLists.txt 文件,在project (pcl-visualizer)
后
添加上set(Qt5_DIR "E:\Qt5.9.1\5.9.1\msvc2017_64\lib\cmake\Qt5")
,中间的路径要修改成自己的qt所存放的位置,但是后面\5.9.1\msvc2017_64\lib\cmake\Qt5
是固定的。
- Found package configuration file:
E:/Qt5.9.1/5.9.1/msvc2017_64/lib/cmake/Qt5/Qt5Config.cmake
but it set Qt5_FOUND to FALSE so package “Qt5” is considered to be NOT
FOUND. Reason given by package:
The Qt5 package requires at least one component
解决方法:
在set(Qt5_DIR "E:\Qt5.9.1\5.9.1\msvc2017_64\lib\cmake\Qt5")
之后添加下面三行
find_package (Qt5Widgets)
find_package (Qt5Core)
find_package (Qt5Gui)
并把find_package (Qt5 REQUIRED)
这行代码删掉
4.CMake Error at CMakeLists.txt:27 (include): include called with wrong number of arguments. include() only takes one file.
解决方法:
将INCLUDE (${QT_USE_FILE})
修改成为INCLUDE _DIRECTORIES (${QT_USE_FILE})
即可。