<div dir="ltr">Bonjour Eric,<div><br></div><div>Thank you for you answer.</div><div dir="ltr"><div><br></div><div><br></div><div class="gmail_quote"></div><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><br></div><div><div>e.g. note that with your current setup if you do:</div><div>DESTDIR=/tmp make package<br></div><div><br></div><div>you get what you want in the DEB file.</div></div></div></div></div></blockquote><div><br></div></div></div></div><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div>Yes, it works.</div></div></div><div dir="ltr"><div class="gmail_quote"></div></div></div><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><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"><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><br></div><div>I see only one solution to this issue: actually set a prefix on the external project and implement a boolean variable CPACK_IGNORE_INSTALL_PREFIX to remove it into the package. I tihnk it is the most consistent way to resolve this ?</div></div></blockquote><div><br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>I would say you should find a way to have 2 differents prefixes.</div><div><br></div><div>The first should be used when doing "make"</div><div>The second one used when cpack runs.</div></div></div></div></blockquote><div><br></div></div></div></div><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div>An option like "CMAKE_ONLY_PREFIX" in the ExternalProject ?</div><div><br></div><div>A third solution could be:</div></div></div><div dir="ltr"><div class="gmail_quote"><div>An option like "CPACK_OVERRIDE_DEST_DIR" could detect if 'DESTDIR=' is issued in the INSTALL_COMMAND of the external project. If the option is true, it overrides it with the CPACK_INSTALL_PREFIX.</div></div></div></div><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div><br></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>All that said, may be you can "simply" craft an install_command script you can call in the</div><div>INSTALL_COMMAND argument of ExternalProject_Add and which verifies if DESTDIR is already set or not</div><div>in order to call "make install" or "DESTDIR=/choose/your/path make install".</div><div><br></div><div>However this is kind of workaround to throw away the first install step done when doing make while keeping the second one done by cpack...</div></div></div></div></blockquote><div> </div></div></div></div><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div>Actually it would work for me as I do not use the first make install. It is the same as DESTDIR=/tmp make package, but integrated into the CMakeLists.</div></div></div></div><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div><br></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>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><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><br></div><div><br></div><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><br></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></div></blockquote></div></div></div><div dir="ltr"><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><br></div><div>--</div><div>Eric</div><div><br></div></div></div></div></blockquote></div></div></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>