title: CMake FIND_PACKAGE succeeds but returns wrong path
body: <p>I'm trying to have CMake 2.8.6 link to boost::program_options using the following code in my CMakeLists.txt</p>
  
  <pre><code>FIND_PACKAGE(Boost COMPONENTS program_options REQUIRED)
  INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIR})
  
  ADD_EXECUTABLE (segment segment.cpp)
  TARGET_LINK_LIBRARIES (segment ${Boost_LIBRARIES})
  </code></pre>
  
  <p>The find command seems to succeed but passes the wrong directory to the linker. The package is actually in:</p>
  
  <pre><code>`/usr/lib64/libboost_program_options-mt.so.5`
  </code></pre>
  
  <p>but <code>CMakeFiles/segment.dir/link.txt</code> lists the following:</p>
  
  <pre><code>/cm/shared/apps/gcc/4.4.6/bin/c++       CMakeFiles/segment.dir/segment.cpp.o  -o segment -rdynamic /usr/lib64/lib64/libboost_program_options-mt.so.5 -lpthread -lrt -Wl,-rpath,/usr/lib64/lib64
  </code></pre>
  
  <p>Note the extra <code>lib64</code> in the path. Also, the -l flag in front of the path seems to be missing.</p>
  
  <p>When running CMake it reports that it correctly finds the package, and the <code>{$Boost_LIBRARIES}</code> variable seems to list the correct libs:</p>
  
  <pre><code>Boost  found.
  Found Boost components:
     program_options
  ${Boost_LIBRARIES} - optimized;boost_program_options-mt-shared;debug;boost_program_options-mt-shared-debug
  </code></pre>
  
  <p>The generated CMakeCache.txt file starts with:</p>
  
  <pre><code>//The directory containing a CMake configuration file for Boost.
  Boost_DIR:PATH=/usr/lib64/boost
  
  //Boost include directory
  Boost_INCLUDE_DIR:FILEPATH=/usr/include
  </code></pre>
  
  <p>Which seems to be correct. But when running make it uses the path in link.txt above and I get the error:</p>
  
  <pre><code>make[2]: *** No rule to make target `/usr/lib64/lib64/libboost_program_options-mt.so.5', needed by `segment'.  Stop.
  make[1]: *** [CMakeFiles/segment.dir/all] Error 2
  make: *** [all] Error 2
  </code></pre>
  
  <p>What might cause this extra injection of a subdir into the path? What might cause link.txt to be generated in this way? And how do I fix it (or work around it)?</p>