[CMake] [CMake General][FindBoost] CMake and Boost 1.46.1

Philip Lowman philip at yhbt.com
Mon May 2 22:31:26 EDT 2011


On Mon, May 2, 2011 at 1:53 AM, Robert Nelson <boardmaster357 at gmail.com>wrote:

> > try ... setting Boost_DEBUG On
> Great suggestion!
>
> I looked at the debug output as you recommended and discovered that
> findboost only searches for filenames that start with "boost"  while
> all the files in the lib directory start with "libboost"
>
> I copied and renamed the regex files in the lib directory to start
> with "boost" instead and it found the regex library but not the
> others.  So a possible solution would be to rename all the files in
> the folder.  This, however, is less than elegant.
>
> Is this a breaking change in the way the boost library files are
> named, a bug in findboost, or did I install boost wrong somehow?
>

On Windows, the boost convention is to prefix shared libraries with "boost"
and static libraries with "libboost".
By default FindBoost searches for shared libraries since this matches CMake
default behavior on Unix platforms.

If you want FindBoost to search for static libraries instead, simply set:
set(Boost_USE_STATIC_LIBS ON)


-- 
Philip Lowman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110502/f0e1ec3b/attachment.htm>


More information about the CMake mailing list