<div dir="ltr">Hello folks,<div><br></div><div>I am trying to create a package with CPack from an External Project using the autotools. The make install part try to copy files to /usr/local/lib, but I do not want to package as root, so it fails. The cpack works because (I think) it create a temp dir and set it as environment variable before issuing the make install. But if I do a "make package", then it fails with permissions denied.</div><div><br></div><div>I am not the first to get stuck with this issue (<a href="https://stackoverflow.com/questions/44724281/cpack-building-external-autogen-project-with-bad-output-location">https://stackoverflow.com/questions/44724281/cpack-building-external-autogen-project-with-bad-output-location</a>)</div><div>So I do not think that there is a direct solution ? Anyway, I can implement one and send the patch. </div><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>Do you have other ideas before I start implementing it ? </div><div><br></div><div>Thank you all,</div><div>Alfred</div><div><br></div><div>The CMakeLists.txt: (usable as is) <<<EOF</div><div><br></div><div><div>project(sqlcipher)</div><div><br></div><div>cmake_minimum_required (VERSION 2.8)</div><div><br></div><div>include(ExternalProject)</div><div><br></div><div>ExternalProject_Add(</div><div>    sqlcipher</div><div>    GIT_REPOSITORY <a href="https://github.com/sqlcipher/sqlcipher.git">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><br></div><div>set(CPACK_DEBIAN_PACKAGE_PROVIDES libsqlcipher0 libsqlcipher-dev sqlcipher)</div><div>set(CPACK_DEBIAN_PACKAGE_REPLACES ${CPACK_DEBIAN_PACKAGE_PROVIDES})</div><div>set(CPACK_DEBIAN_PACKAGE_CONFLICTS ${CPACK_DEBIAN_PACKAGE_PROVIDES})</div><div><br></div><div>SET(CPACK_GENERATOR "DEB")</div><div>SET(CPACK_PACKAGE_NAME "my-sqlcipher")</div><div>SET(CPACK_PACKAGE_VERSION "3.15")</div><div><br></div><div>SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "me")</div><div>SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION "Install the last version of sqlcipher")</div><div><br></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>INCLUDE(CPack)</div></div><div><br></div><div>EOF</div><div><br></div><div>make package  # fails if not root</div><div>cpack # succes if not root</div><div><br></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>