<br><br><div class="gmail_quote">On Jan 24, 2008 2:17 PM, Hendrik Sattler &lt;<a href="mailto:post@hendrik-sattler.de">post@hendrik-sattler.de</a>&gt; 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 class="Ih2E3d">Am Donnerstag 24 Januar 2008 schrieb Sahn Lam:<br></div><div class="Ih2E3d">&gt; I don&#39;t trust myself to be able to specify the dependencies correctly - now<br>&gt; or in the future. &nbsp;It is not as simple as it seems. &nbsp;For example, let&#39;s say
<br>&gt; I have this structure:<br>&gt;<br>&gt; libA has gen.h which is generated<br>&gt; libB has header1.h which includes libA/gen.h<br>&gt; libC has header2.h which includes libB/header1.h<br>&gt;<br>&gt; If I understand how cmake works correctly, in order for things to get built
<br>&gt; in the right order, I have to use ADD_DEPENDENCIES to tell cmake that to<br>&gt; build libA before libB and libC.<br><br></div>You shouldn&#39;t have to do anything to make that work, actually. That&#39;s what the
<br>dependency scanner is supposed to handle automatically.<br>Do you add the header files as source files to the add_library()?<br><font color="#888888"><br>HS<br></font></blockquote></div><br>I did use ADD_LIBRARY to add 
gen.h to libA along with all the other source files in libA.&nbsp; That didn&#39;t generate the correct build order unless I explicitly made libB and libC depend on libA using ADD_DEPENDENCIES.<br><br>What am I missing?<br><br>
Thanks,<br><br>Sahn<br>