[CMake] Not able to find boost with cmake

Bo Zhou bo.schwarzstein at gmail.com
Fri Aug 4 00:19:53 EDT 2017


It's better not to use downloaded pre-built libraries, always build by
yourself locally.

Before using Boost with CMake, please check
https://cmake.org/cmake/help/v3.0/module/FindBoost.html

If you're trying to use static boost libraries build by MSVC with shared
runtime, please make sure the following statements exist in the PCL.

set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)


Then if you properly set the Boost_INCLUDE_DIR, all the libraries should be
ready then.

On Fri, Aug 4, 2017 at 1:05 PM, 钟元鑫 <cmpute at qq.com> wrote:

> I'm trying to build PCL which has boost as dependency. However, when I
> download boost and build it, cmake cannot find it through any way.
>
> I tried two version of boost, one is pre-build boost which was built by
> other person online and version is 1.61, another is one I downloaded whose
> version is 1.64. File structures of the two versions are the same:
> [XXX]/include/boost-1_64/boost is the include dir and [XXX]/lib is the bin
> dir
>
> I try to specify the Boost_INCLUDE_DIR to [XXX]/include/boost-1_64/boost,
> the messages in output window is attached (I turned Boost_DEBUG on).
>
> I'm on Window 10 and VS2017
>
> Thanks,
> Jacob Zhong
>
> ------------------
> 顺颂时祺
>
> 钟元鑫  Yuanxin Zhong
> 清华大学汽车工程系  Dept. of Automotive Engineering, Tsinghua Univ.
> Ad:Haidian District, Beijing, P.R.China    100084
> Tel:+86 17888833119 <+86%20178%208883%203119>
> E-mail:cmpute at foxmail.com <wangtong19929 at foxmail.com> / zhongyx
> 14 at mails.tsinghua.edu.cn <tong-wan14 at mails.tsinghua.edu.cn>
>
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170804/9cb745ba/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: EC7BE632 at 9C9BB14D.6FF28359.jpg
Type: image/jpeg
Size: 13551 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170804/9cb745ba/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 475B1FF2 at DAF68473.6FF28359.jpg
Type: image/jpeg
Size: 11484 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170804/9cb745ba/attachment-0003.jpg>


More information about the CMake mailing list