<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><span class="gmail-"><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>Which makes me think, if you primary goal is to package an external project, wouldn't it be simpler to add support for a "PACKAGE" step to </div><div>ExternalProject ? Or is this external project meant to be packaged in the same package as the project using it?</div></div></div></div></blockquote><div> </div></div></div></div></span><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div>I cannot add a package step as the external project do not support packaging, it is only a configure / make / make install project. That is why I use CPack. <br></div><div>But I package it as a separate package.</div></div></div></div></div></blockquote><div><br></div><div>Yep I understand that. </div><div>My suggestion was precisely to **add** a package step to ExternalProject unless it doesn't make sense for ExternalProject_Add</div><div><br></div><div>May be you can do that with ExternalProject_Add_Step in your own CMakeLists.txt ?</div><div><br></div><div>Something like (untested):</div><div><br></div><div><div>ExternalProject_Add_Step(sqlcipher package</div><div>    COMMAND "cpack"</div><div>    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}</div><div>    COMMENT "Package with cpack"</div><div>    DEPENDEES "install"</div><div> )</div></div><div><br></div><div><div>I don't know much about ExternalProject internals so I may be wrong.</div></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div>Anyway, the DESTDIR=/tmp make package does the trick for me but I still can implement an integrated solution if it is useful for others ?</div></div></div></div></div></blockquote><div><br></div><div>As I said this trick is only a way to throw away (in /tmp) the default install command which is called by</div><div>make (or make package) as the part of the install step of ExternalProject_Add.</div><div><br></div></div><div>-- <br></div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Eric<br></div></div></div></div></div>
</div></div>