<div>I am having a problem setting up CMake to find the Boost unit test framework library when building a test program. In the top level CMakeLists.txt file I have:</div>
<div> </div>
<div>ENABLE_TESTING()</div>
<div> </div>
<div>add_subdirectory ( path/to/test )</div>
<div> </div>
<div>In the test directory CMakeLists.txt file I have:</div>
<div> </div>
<div>LINK_DIRECTORIES ( ${Boost_LIBRARY_DIRS} )</div>
<div>ADD_EXECUTABLE ( test test.cpp )</div>
<div>ADD_TEST ( test ${CMAKE_CURRENT_BINARY_DIR}/test )</div>
<div> </div>
<div>I added the LINK_DIRECTORIES because I though that the linker was not getting the path to the Boost library. That is wrong since the full path to the library is in the properties for this project. So I figured since it had the full name it should be able to find it. Not quite.</div>

<div> </div>
<div>The error message I get says:</div>
<div> </div>
<div>LNK1104: cannot open file &#39;boost_unit_test_framework-vc90-mt-gd-1_45.lib&#39;</div>
<div> </div>
<div>I have boost installed in C:\boost. The FIND_BOOST macro able to find the installation headers and libraries I require. The only thing that is different is that the directory has the Boost unit test framework named as:</div>

<div> </div>
<div>C:\boost\lib\libboost_unit_test_framework-vc90-mt-gd-1_45.lib</div>
<div> </div>
<div>That name, libboost_unit_test...., is different from the expected name of boost_unit_test...</div>
<div> </div>
<div>I am at a loss as to why this is the case.</div>
<div> </div>
<div>CMake version: 2.8.4</div>
<div>Boost version: 1.45</div>
<div> </div>
<div>Stephen</div>