[CMake] Can't get Boost_${COMPONENT}_LIBRARY to work

E. Wing ewmailing at gmail.com
Mon Mar 2 21:39:03 EST 2009


Thanks for the replies. Capitalization was indeed the problem.



>> FIND_PACKAGE(Boost 1.3.6 COMPONENTS date_time filesystem regex system)
>
>  The "1.3.6" is a typo, btw.  You probably want "1.36" or whatever minimum
> version you need to use boost
>
>>
Thanks for pointing that out. I probably would have never noticed.



>
> Also, one additional thing.  If you use Boost_LIBRARIES it will
> automatically contain all of the libraries you specify after the COMPONENTS
> line (including debug/optimized keywords).  This is often fine for many
> Boost use-cases.  If it's not and you must link individually, the way you
> were doing it should work fine, just make the components be UPPERCASE.
>

So I am building a sub-library (currently static) of a larger project. This
sub-library only needs the date_time library of the components I listed. I
don't have a strong opinion either way of whether I link to just date_time
or the whole thing; it's just that the original Makefile I'm converting from
singled this out. Do you feel that I'm better off using Boost_LIBRARIES?

Thanks,
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090302/2124eccf/attachment.htm>


More information about the CMake mailing list