<div dir="ltr"><div>The only difference is about the usage of preinstall target. The Ninja generator does not use it, and it should because it need to build sqlcipher before packaging it...</div><div><br></div><div>the interesting part of vimdiff of cpack --trace : </div><div><br></div><div><b>        Unix Makefiles                                   |               Ninja</b></div><div>  CPack: Install projects                              |  CPack: Install projects</div><div>  ---------------------------------------------- --------|  CPack: - Run preinstall target for: sqlcipher    </div><div>  CPack: - Install project: sqlcipher             |  CPack: - Install project: sqlcipher</div><div><br></div><div>Regards,</div><br><div class="gmail_quote"><div dir="ltr">Le mer. 25 avr. 2018 à 13:03, Alfred Sawaya <<a href="mailto:alfred@huji.fr" target="_blank">alfred@huji.fr</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello folks,<div><br></div><div>I ran into an issue today and I think it is an unexpected behaviour.</div><div><br></div><div>I have a CMake project that build an external project (autotools) and pack it into a .deb.</div><div>It works when I use the Makefile generator (cmake /my/path) but it does not when I use the Ninja generator (cmake -G Ninja /my/path) -> it produces an valid but empty package.</div><div><br></div><div>I expected that the behaviour would be the same regardless the generator I use. Is that correct ?</div><div><br></div><div><b>Here is the complete CMakeLists.txt : </b></div><div><br></div><div><div>project(sqlcipher)</div><div>cmake_minimum_required (VERSION 2.8)</div><div>include(ExternalProject)</div><div><br></div><div>ExternalProject_Add(</div><div>    lsqlcipher</div><div>    GIT_REPOSITORY <a href="https://github.com/sqlcipher/sqlcipher.git" target="_blank">https://github.com/sqlcipher/sqlcipher.git</a></div><div>    BUILD_IN_SOURCE true</div><div>    CONFIGURE_COMMAND ./configure --enable-tempstore=yes "CFLAGS=-DSQLITE_HAS_CODEC"</div><div>)</div><div><br></div><div>SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libssl1.0.2,libssl-dev")</div><div>SET(CPACK_DEBIAN_PACKAGE_PROVIDES "libqlcipher0, libsqlcipher-dev, sqlcipher")</div><div>SET(CPACK_DEBIAN_PACKAGE_REPLACES ${CPACK_DEBIAN_PACKAGE_PROVIDES})</div></div><div><div>SET(CPACK_GENERATOR "DEB")</div><div>SET(CPACK_PACKAGE_NAME "my-sqlcipher")</div><div>SET(CPACK_PACKAGE_VERSION "3.20.1")</div><div>SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Me")</div><div>SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION "Install the last version of sqlcipher")</div><div>SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "all")</div><div>SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")</div></div><div>INCLUDE(CPack)<br></div><div><br></div><div><b>To reproduce : </b></div><div><ol><li>Copy the CMakeLists.txt content to a file<br></li><li>mkdir build</li><li>cd build</li><li>cmake ..</li><li>make package</li><li>dpkg -c *.deb # => there is contents</li><li>rm -rf *</li><li>cmake -G Ninja ..</li><li>ninja package</li><li>dpkg -c *.deb # => it is empty...</li></ol><div>Any idea of what I am doing wrong ? Or is it a bug in CMake/CPack ?</div></div><div><br></div><div>Thank you,</div><div><br></div><div>Alfred</div></div>-- <br><div dir="ltr" class="m_-7410561240385097364m_-4885576929753240638gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Cordialement,</div><div>Alfred Sawaya</div></div></div></blockquote></div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Cordialement,</div><div>Alfred Sawaya</div></div></div>