<div class="gmail_quote">On Mon, Mar 2, 2009 at 7:20 PM, E. Wing <span dir="ltr">&lt;<a href="mailto:ewmailing@gmail.com">ewmailing@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I want to link something against the date_time library in boost. The comments in the FindBoost.cmake module imply that I <br>should be able to use something like ${Boost_date_time_LIBRARY}. But the variable is always empty for me.<br>

<br>Here is my code:<br>SET(Boost_USE_STATIC_LIBS   ON)<br>SET(Boost_USE_MULTITHREADED ON)<br>FIND_PACKAGE(Boost 1.3.6 COMPONENTS date_time filesystem regex system)</blockquote><div> The &quot;1.3.6&quot; is a typo, btw.  You probably want &quot;1.36&quot; or whatever minimum version you need to use boost <br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>MESSAGE(&quot;boost libs ${Boost_LIBRARIES}&quot;)<br>
MESSAGE(&quot;boost date_time: ${Boost_date_time_LIBRARY}, found: ${Boost_date_time_FOUND}&quot;)<br>MESSAGE(&quot;boost filesys: ${Boost_filesystem_LIBRARY}, found: ${Boost_filesystem_FOUND}&quot;)<br><br>And my output:<br>

boost libs /usr/local/lib/libboost_date_time-mt.dylib;/usr/local/lib/libboost_filesystem-mt.dylib;/usr/local/lib/libboost_regex-mt.dylib;/usr/local/lib/libboost_system-mt.dylib<br>boost date_time: , found: <br>boost filesys: , found: <br>

<br>Am I misunderstanding something?</blockquote><div><br>Looks like a documentation bug.  From what I can tell all Boost components use uppercase in their names (the libraries also show up in the advanced part of the cache).  I&#39;ve fixed the documentation of FindBoost.cmake in CVS.<br>
<br>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&#39;s not and you must link individually, the way you were doing it should work fine, just make the components be UPPERCASE.<br>
<br><br><br></div></div>-- <br>Philip Lowman<br>