使用显式平台工具集定位Visual Studio的cmake无法找到提升

时间:2014-04-30 09:18:34

标签: cmake visual-studio-2013

我试图像这样生成一个Visual Studio 2013项目:

cmake -G "Visual Studio 12" -T "v100" ..

我的项目正在使用一些静态Boost库,如system。启用Boost_DEBUG后,我会得到以下输出:

[ C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:930 ] Searching for SYSTEM_LIBRARY_RELEASE: libboost_system-vc120-mt-1_53;libboost_system-vc120-mt;libboost_system-mt-1_53;libboost_system-mt;libboost_system;libboost_system-vc120-mt-s-1_53;libboost_system-vc120-mt-s;libboost_system-mt-s-1_53;libboost_system-mt-s
[ C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:966 ] Searching for SYSTEM_LIBRARY_DEBUG: libboost_system-vc120-mt-gd-1_53;libboost_system-vc120-mt-gd;libboost_system-mt-gd-1_53;libboost_system-mt-gd;libboost_system-mt;libboost_system;libboost_system-vc120-mt-s-gd-1_53;libboost_system-vc120-mt-s-gd;libboost_system-mt-s-gd-1_53;libboost_system-mt-s-gd

[...]

CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:1111 (message):
  Unable to find the requested Boost libraries.

  Boost version: 1.53.0

  Boost include path: C:/Boost/boost_1_53_0

  Could not find the following static Boost libraries:

          boost_system
          boost_thread
          boost_date_time

  No Boost libraries were found.  You may need to set BOOST_LIBRARYDIR to the
  directory containing Boost libraries or BOOST_ROOT to the location of
  Boost.
Call Stack (most recent call first):
  CMakeLists.txt:8 (find_package)

猜测 cmake没有找到boost库,因为它搜索错误的文件名。我告诉它生成一个包含目标平台v100的项目,因此它应该搜索libboost_system-vc100-mt-1_53,而不是libboost_system-vc120-mt-1_53,对吧?我安装的Boost版本不包含vc120库,我使用的其他库仅作为vc100使用。那么我该如何解决这个问题?

0 个答案:

没有答案