Qt项目 Cmake出错

CMake Warning (dev) at C:/Qt/Qt5.2.1/5.2.1/msvc2012_64/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:224 (configure_file):
  configure_file called with unknown argument(s):

   COPY_ONLY

Call Stack (most recent call first):
  CMakeLists.txt:51 (qt5_add_resources)
This warning is for project developers.  Use -Wno-dev to suppress it.


从github上拉下来一个Qt项目用Cmake生成工程,却报了如上错误。

经过查找这原来是Qt的一个BUG[QTBUG-44637],在Qt5.4.1已经修复,不过我用的是Qt5.2.1。


解决方案:

找到上述目录下的Qt5CoreMacros.cmake文件,跳到224行,将COPY_ONLY改为COPYONLY,然后重新configure即可。



你可能感兴趣的:(Qt)