<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7638.1">
<TITLE>FindBoost.cmake to find the boost libraries</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P ALIGN=LEFT><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS">Hi</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS"> all</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS">,</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS">I am using the code below in cmakelists.txt to find the boost libraries using cmake 2.8.</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"> </SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS">After the execution</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"> <FONT SIZE=2 FACE="Trebuchet MS">“</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS">Boost_LIBRARIES</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS">”</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS"> does not contain anything.</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"> <FONT SIZE=2 FACE="Trebuchet MS">Am I correct in assuming that this variable must be populated with the list of boost libraries?</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS">Also,</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"> <FONT SIZE=2 FACE="Trebuchet MS">I am not sure how do I get the</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"> <FONT SIZE=2 FACE="Trebuchet MS">appropriate debug/rele</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS">a</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS">se</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"> <FONT SIZE=2 FACE="Trebuchet MS">boost</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"> <FONT SIZE=2 FACE="Trebuchet MS">libraries depending on</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"> <FONT SIZE=2 FACE="Trebuchet MS">the build configuration.</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS">What are your thoughts on</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"> <FONT SIZE=2 FACE="Trebuchet MS">the</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS"></FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"> <FONT SIZE=2 FACE="Trebuchet MS">Find</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS">B</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS">oost.cmake file</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS"></FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"> <FONT SIZE=2 FACE="Trebuchet MS">located</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"> <FONT SIZE=2 FACE="Trebuchet MS">at the link below</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"> <FONT SIZE=2 FACE="Trebuchet MS">(It was discussed in the mailing list in January 2008)</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS">?</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-gb"></SPAN><A HREF="http://www.cmake.org/pipermail/cmake/2008-January/019245.html"><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Trebuchet MS">http://www.cmake.org/pipermail/cmake/2008-January/019245.html</FONT></U></SPAN><SPAN LANG="en-gb"></SPAN></A><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS">Thanks,</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS">Vikas</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS">---------------------------------------------------------------------------------------------------------------------------</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS">set(BOOST_ROOT "C:/Program Files/boost1.35.0")</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS">set(Boost_DEBUG TRUE)</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS">#search for BOOST</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS">INCLUDE(${CMAKE_MODULE_PATH}/FindBoost.cmake)</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS">IF (Boost_FOUND)</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS"> #compare version strings </FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS"> STRING (COMPARE LESS "${Boost_VERSION}" 1.35.0 VersionIncompatible)</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS"> IF (VersionIncompatible)</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS"> MESSAGE(FATAL_ERROR "Boost ${Boost_VERSION} not supported. </FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS"> Only 1.35.0 version is supported.")</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS"> ELSE (VersionIncompatible)</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS"> MESSAGE (STATUS "Found Boost ${Boost_VERSION} -- ${Boost_LIBRARIES}")</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS"> INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS"> SET(requiredLibs ${requiredLibs} ${Boost_LIBRARIES})</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS"> ENDIF (VersionIncompatible)</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS">ELSE (Boost_FOUND)</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS"> MESSAGE (STATUS "Boost NOT FOUND")</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS">ENDIF (Boost_FOUND)</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-gb"><FONT SIZE=2 FACE="Trebuchet MS">-------------------------------------------------------------------------------------------------------------------------------</FONT></SPAN><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-gb"></SPAN></P>
</BODY>
</HTML>