cmake - 无法找到请求的Boost库

时间:2017-09-22 10:10:27

标签: visual-studio qt cmake cgal cmake-gui

我想使用CGAL库,我使用: CGAL 4.10,Microsoft visual studio 2013,CMake 3.9.3,提升1.65,QT创建者4.3.1

使用Cmake配置CGAL时,它显示以下错误:

Looking for pthread.h
Looking for pthread.h - not found
Found Threads: TRUE  
CMake Error at C:/Program Files/CMake/share/cmake-3.9/Modules/FindBoost.cmake:1902 (message):
Unable to find the requested Boost libraries.

Unable to find the Boost header files.  Please set BOOST_ROOT to the root
directory containing Boost or BOOST_INCLUDEDIR to the directory containing
Boost's headers.
Call Stack (most recent call first):
cmake/modules/CGAL_SetupBoost.cmake:21 (find_package)
cmake/modules/CGAL_SetupDependencies.cmake:85 (include)
CMakeLists.txt:681 (include)


Boost include:     Boost_INCLUDE_DIR-NOTFOUND
Boost libraries:   
Boost definitions: 
USING BOOST_VERSION = '..'
== Detect external libraries (DONE) ==

== Write compiler_config.h ==
Performing Test CGAL_CFG_DENORMALS_COMPILE_BUG - Success
Performing Test CGAL_CFG_FPU_ROUNDING_MODE_UNWINDING_VC_BUG - Success
Performing Test CGAL_CFG_IEEE_754_BUG - Success
Performing Test CGAL_CFG_ISTREAM_INT_BUG - Success
Performing Test CGAL_CFG_MATCHING_BUG_5 - Success
Performing Test CGAL_CFG_MATCHING_BUG_6 - Failed
Performing Test CGAL_CFG_MATCHING_BUG_7 - Failed
Performing Test CGAL_CFG_MATCHING_BUG_8 - Success
Performing Test CGAL_CFG_NESTED_CLASS_FRIEND_DECLARATION_BUG - Failed
Performing Test CGAL_CFG_NO_LIMITS - Success
Performing Test CGAL_CFG_NO_NEXTAFTER - Failed
Performing Test CGAL_CFG_NO_STL - Success
Performing Test CGAL_CFG_NUMERIC_LIMITS_BUG - Success
Performing Test CGAL_CFG_OUTOFLINE_MEMBER_DEFINITION_BUG - Success
Performing Test CGAL_CFG_TEMPLATE_IN_DEFAULT_PARAMETER_BUG - Success
Performing Test CGAL_CFG_TYPENAME_BEFORE_DEFAULT_ARGUMENT_BUG - Success
Performing Test CGAL_CFG_USING_BASE_MEMBER_BUG_2 - Success
== Write compiler_config.h (DONE) ==


CMake Error: The following variables are used in this project, but they     are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the  CMake files:
Boost_INCLUDE_DIR (ADVANCED)
used as include directory in directory C:/dev/CGAL-4.10/src/CGAL
used as include directory in directory C:/dev/CGAL-4.10/src/CGAL
used as include directory in directory C:/dev/CGAL-4.10/src/CGAL_Core
used as include directory in directory C:/dev/CGAL-4.10/src/CGAL_Core
used as include directory in directory C:/dev/CGAL-4.10/src/CGAL_ImageIO
used as include directory in directory C:/dev/CGAL-4.10/src/CGAL_ImageIO

我手动将Boost_INCLUDE_DIR,BOOST_ROOT添加到环境视觉中

Boost_INCLUDE_DIR = C:\ dev的\ boost_1_65_0; BOOST_ROOT = C:\ dev的\ boost_1_65_0

我尝试了很多版本的boost,cmake和cgal with visual sutudio 2015,2013 and non of the work

我感谢任何帮助。谢谢你

1 个答案:

答案 0 :(得分:0)

如果你正在使用Cygwin,你可以使用cmake-gui并使用界面填充你的路径,这可以限制拼写错误的风险,找到丢失的字段更为明显。 另一种选择是在构建目录中编辑hte CMakeCache.txt以提供路径,因此您不必将变量声明为环境变量。