Hi Adam,<br><br>I have used the FindBoost.cmake and now am able to find the boost library(include and libs) but I have a linking problem. I am using the Boost_1_35 and in that am using several libriries including Boost::thread. I am getting the linker error for the Boost::thread; On my disk I have the below mentioned lib files <br>
<br>libboost_thread-vc80-mt-1_35.lib<br>libboost_thread-vc80-mt-gd-1_35.lib<br>libboost_thread-vc80-mt-s-1_35.lib<br>libboost_thread-vc80-mt-sgd-1_35.lib<br>libboost_thread-vc90-mt-s-1_35.lib<br>libboost_thread-vc90-mt-sgd-1_35.lib<br>
<br>but the NMake is searching for 'libboost_thread-vc90-mt-gd-1_35.lib', which is not present. What could be the reason?<br><br>Thanks for your help in advance.<br><br>Regards,<br>-Ram<br><br><br><br><div class="gmail_quote">
On Wed, Jan 21, 2009 at 8:44 PM, Adam Weiss <span dir="ltr"><<a href="mailto:cseadam%2Bcmake@gmail.com">cseadam+cmake@gmail.com</a>></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;">
<div><div></div><div class="Wj3C7c">On Wed, Jan 21, 2009 at 3:27 PM, Michael Jackson<br>
<<a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a>> wrote:<br>
><br>
> On Jan 21, 2009, at 3:19 PM, Alexander Neundorf wrote:<br>
><br>
>> On Wednesday 21 January 2009, Ram Mulage wrote:<br>
>>><br>
>>> Hi All,<br>
>>><br>
>>> I am using boost library in my project and I want to link the boost<br>
>>> static<br>
>>> libraries into my project. How do i do this?<br>
>>><br>
>>> My project directory looks as below and each of the directories has the<br>
>>> CMakeLists.txt file.<br>
>>><br>
>>> Project<br>
>>><br>
>>> |-Lib1<br>
>>> |-Lib2<br>
>>> |-Application<br>
>>><br>
>>> I am using the some of the boost libraries in the 'Application' directory<br>
>>> apart from the Lib1 and Lib2 and the exe is built in Application<br>
>>> directory<br>
>>> itself. The boost librariess and the boost headers are present<br>
>>> 'C:/Users/Admin/Boost/lib/windows' and 'C:/Users/Admin/Boost/boost'.<br>
>>> Could<br>
>>> you please tell how my CMakeList.txt for 'Application' directory should<br>
>>> look?<br>
>>><br>
>>> I would appreciate any help in this regard.<br>
>><br>
>> Please have a look at the FindBoost.cmake module documentation, you<br>
>> probably<br>
>> want to use it.<br>
>> I haven't used Boost with cmake yet, but it should be more or less the<br>
>> same as<br>
>> for other packages:<br>
>><br>
>> # make cmake search for the package:<br>
>> find_package(Foo REQUIRED)<br>
>><br>
>> # add the include directories:<br>
>> include_directories(${FOO_INCLUDE_DIRS})<br>
>><br>
>> # add targets etc.<br>
>> add_executable(hello main.cpp)<br>
>><br>
>> # link to the necessary libraries<br>
>> target_link_libraries(hello ${FOO_LIBRARIES})<br>
>><br>
>> Alex<br>
>><br>
><br>
> I have a gut feeling just looking at where his install is located and the<br>
> include directory that the standard Find_Package(Boost) is NOT going to<br>
> work.. but give it a try and let's see what happens.<br>
><br>
> Mike<br>
><br>
> _______________________________________________<br>
> CMake mailing list<br>
> <a href="mailto:CMake@cmake.org">CMake@cmake.org</a><br>
> <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
><br>
<br>
<br>
</div></div>As the module says:<br>
<br>
# Variables used by this module, they can change the default behaviour<br>
and need to be set<br>
# before calling find_package:<br>
# Boost_USE_MULTITHREAD Can be set to OFF to use the non-multithreaded<br>
# boost libraries. Defaults to ON.<br>
# Boost_USE_STATIC_LIBS Can be set to ON to force the use of the static<br>
# boost libraries. Defaults to OFF.<br>
# Boost_ADDITIONAL_VERSIONS A list of version numbers to use for searching<br>
# the boost include directory. The default list<br>
# of version numbers is:<br>
# 1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1,<br>
# 1.35, 1.35.0, 1.35.1, 1.36.0, 1.36.1<br>
# If you want to look for an older or newer<br>
# version set this variable to a list of<br>
# strings, where each string contains a<br>
number, i.e.<br>
# SET(Boost_ADDITIONAL_VERSIONS<br>
"0.99.0" "1.35.0")<br>
# BOOST_ROOT Preferred installation prefix for<br>
searching for Boost,<br>
# set this if the module has problems<br>
finding the proper Boost installation<br>
# BOOST_INCLUDEDIR Set this to the include directory of<br>
Boost, if the<br>
# module has problems finding the<br>
proper Boost installation<br>
# BOOST_LIBRARYDIR Set this to the lib directory of Boost, if the<br>
# module has problems finding the<br>
proper Boost installation<br>
#<br>
# The last three variables are available also as environment variables<br>
<br>
<br>
Following this, there should be no problem getting Find_Package(Boost) to work.<br>
<font color="#888888"><br>
-Adam<br>
</font><div><div></div><div class="Wj3C7c">_______________________________________________<br>
CMake mailing list<br>
<a href="mailto:CMake@cmake.org">CMake@cmake.org</a><br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br>