Michael,<br><br>I agree with the first part and not agree with the second part of your message. <br>Libraries (*.lib)  are stored to the different folders and compiler will not find A to link it into B without full path. So CMake should provide linker with the full path of the A and B libraries. To calculate full path CMake should process project file.<br>
<br><div class="gmail_quote">2009/5/28 Michael Jackson <span dir="ltr">&lt;<a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
On May 28, 2009, at 3:03 PM, Dmytro Ovdiienko wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
&gt; The other side of this problem is you have to write ADD_SUBDIRECTORY<br>
&gt; commands in specific order. IMHO it is inconvenient.<br>
<br>
CMakeLists are essentially a scripting language, so of course order<br>
matters. What would you propose instead?<br>
<br>
But... why does TARGET_LINK_LIBRARIES work correctly? You can pass not loaded-yet project name to TARGET_LINK_LIBRARIES.<br>
</blockquote>
<br>
<br></div>
Remember that you are passing the names of _libraries_ to &quot;target_link_libraries&quot; and not the names of Projects. The fact that it might work just means that you named your libraries the same as the project name.<br>

<br>
_________________________________________________________<br>
Mike Jackson                  <a href="mailto:mike.jackson@bluequartz.net" target="_blank">mike.jackson@bluequartz.net</a><br>
BlueQuartz Software                    <a href="http://www.bluequartz.net" target="_blank">www.bluequartz.net</a><br>
Principal Software Engineer                  Dayton, Ohio<br>
<br>
<br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br>