<br><br><div class="gmail_quote">On Jan 24, 2008 2:17 PM, Hendrik Sattler <<a href="mailto:post@hendrik-sattler.de">post@hendrik-sattler.de</a>> 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">> I don't trust myself to be able to specify the dependencies correctly - now<br>> or in the future. It is not as simple as it seems. For example, let's say
<br>> I have this structure:<br>><br>> libA has gen.h which is generated<br>> libB has header1.h which includes libA/gen.h<br>> libC has header2.h which includes libB/header1.h<br>><br>> If I understand how cmake works correctly, in order for things to get built
<br>> in the right order, I have to use ADD_DEPENDENCIES to tell cmake that to<br>> build libA before libB and libC.<br><br></div>You shouldn't have to do anything to make that work, actually. That'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. That didn'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>