我有这个cmake文件:
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
project(statistical_removal)
FIND_PACKAGE(Boost)
set(Boost_DEBUG ON)
set(BOOST_ROOT "C:/Program Files/PCL 1.8.0/3rdParty/Boost")
set(BOOST_INCLUDEDIR "${BOOST_ROOT}/include/boost-1_61/boost")
set(BOOST_LIBRARYDIR "${BOOST_ROOT}/lib")
find_package(PCL 1.8 REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
add_executable (statistical_removal statistical_removal.cpp)
target_link_libraries (statistical_removal ${PCL_LIBRARIES})
我的错误日志是:
[ C:/Program Files/CMake/share/cmake-3.14/Modules/FindBoost.cmake:1968 ] Boost_FOUND = 1
Could NOT find Boost
Boost version: 1.61.0
Boost include path: C:/Program Files/PCL 1.8.0/3rdParty/Boost/include/boost-1_61
Could not find the following static Boost libraries:
boost_system
boost_filesystem
boost_thread
boost_date_time
boost_iostreams
boost_serialization
boost_chrono
Some (but not all) of the required Boost libraries were found. You may need to install these additional Boost libraries. Alternatively, set BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.
CMake Error at C:/Program Files/PCL 1.8.0/cmake/PCLConfig.cmake:44 (message):
common is required but boost was not found
Call Stack (most recent call first):
C:/Program Files/PCL 1.8.0/cmake/PCLConfig.cmake:676 (pcl_report_not_found)
C:/Program Files/PCL 1.8.0/cmake/PCLConfig.cmake:835 (find_external_library)
CMakeLists.txt:11 (find_package)
我的增强根文件夹看起来像这样:
C:\ Program Files \ PCL 1.8.0 \ 3rdParty \ Boost
\ include \ boost-1_61 \ boost
所有.hpp文件都存储在此文件夹中,例如system.hpp
\ lib \ boost-1_61 \ boost
在此文件夹中,所有.lib都存储在例如libboost_system-vc120-mt-gd-1_.lib
有什么想法如何正确地设置 BOOST_LIBRARYDIR 路径? 我使用win10。