<div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>May be you can do that with ExternalProject_Add_Step in your own CMakeLists.txt ?<br></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></div></div></blockquote><div><br></div><div>It does not work because the install step still tries to install files to /usr/local/lib and if I set INSTALL_COMMAND at "", CPack will produce an empty package. So I would still need to play with DESTDIR the same way as if I use include(CPack).</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div><div>I don't know much about ExternalProject internals so I may be wrong.</div></div></div></div></div><div dir="ltr"><div class="gmail_extra"><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 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></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><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></div><div dir="ltr"><div class="gmail_extra"><div>-- <br></div><div class="m_6236994179119713845gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Eric<br></div></div></div></div></div>
</div></div></blockquote></div></div><div dir="ltr">-- <br></div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Cordialement,</div><div>Alfred Sawaya</div></div></div>