Boost CMake找不到python库

时间:2014-11-15 09:26:15

标签: visual-studio-2012 boost build cmake

在筛选了许多关于CMake无法找到升级库的问题后,我仍然无法解决我的问题:

我的CMakeLists部分与此相关:

set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
find_package(Boost COMPONENTS python REQUIRED)

include_directories("${PROJECT_BINARY_DIR}")
include_directories("${PROJECT_SOURCE_DIR}/src/mazeGen")
include_directories("${PROJECT_SOURCE_DIR}/src/mazeSolve")

include_directories(${Boost_INCLUDE_DIRS})
target_link_libraries(${EXECUTABLE_NAME} ${Boost_LIBRARIES})

add_executable(${EXECUTABLE_NAME} ${SOURCES} ${HEADERS})

当我指定BOOST_ROOT并尝试构建项目时,错误输出为:

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.55.0

  Boost include path: C:/local/boost_1_55_0

  Could not find the following Boost libraries:

          boost_python

  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:36 (find_package)

我应该在哪里指向CMake才能找到这些库?我怎么能这样做?

所有构建的库都位于${BOOST_ROOT}/stage/lib并且是为VS2012构建的,我尝试将BOOST_LIBRARYDIR设置为${BOOST_ROOT}/stage/lib,但这没有做任何事情

0 个答案:

没有答案