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

E. Wing ewmailing at gmail.com
Mon Mar 2 19:20:38 EST 2009


I want to link something against the date_time library in boost. The
comments in the FindBoost.cmake module imply that I
should be able to use something like ${Boost_date_time_LIBRARY}. But the
variable is always empty for me.

Here is my code:
SET(Boost_USE_STATIC_LIBS   ON)
SET(Boost_USE_MULTITHREADED ON)
FIND_PACKAGE(Boost 1.3.6 COMPONENTS date_time filesystem regex system)
MESSAGE("boost libs ${Boost_LIBRARIES}")
MESSAGE("boost date_time: ${Boost_date_time_LIBRARY}, found:
${Boost_date_time_FOUND}")
MESSAGE("boost filesys: ${Boost_filesystem_LIBRARY}, found:
${Boost_filesystem_FOUND}")

And my output:
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
boost date_time: , found:
boost filesys: , found:

Am I misunderstanding something?

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


More information about the CMake mailing list