[CMake] find_package

matzeNOTAVAILABLE . matze999 at gmail.com
Fri Apr 24 09:36:51 EDT 2015


Hi,
i am struggling somewhat with find_package. I looked at the documentation
and googled quite a bit, but i am still stuck. I alos tried stackoverflow
to no avail.

What i am trying to accomplish is the following:
1) See if my custom boost installation exists (using find_package)
(version 1.57)
2) If it does not -> build it
3) Use find_package again to find the newly built boost libs.

This works up until but not including step 3.

Something that it might be complicating matters (i am not sure) is that i
have a system boost installation (1.54).

1) (... set boost_root ...)
2) FIND_PACKAGE(Boost 1.57 COMPONENTS log thread filesystem system)
3) (... build boost if it Boost_FOUND is 0)
4) FIND_PACKAGE(Boost 1.57 REQUIRED COMPONENTS log thread filesystem system)

The second call to find_package does not find the boost installation and
thus does not set include dirs etc... properly.

I wonder why not?

Any hints are greatly appreciated,
Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150424/aba1aaeb/attachment.html>


More information about the CMake mailing list