在筛选了许多关于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
,但这没有做任何事情