[CMake] how to debug CPack creation

Eric Noulard eric.noulard at gmail.com
Sat Oct 20 04:30:37 EDT 2018


Le sam. 20 oct. 2018 à 10:15, Илья Шипицин <chipitsine at gmail.com> a écrit :

> hi,
>
> we use cmake/cpack for mangling systemd scripts
>
>
> https://github.com/SoftEtherVPN/SoftEtherVPN/blob/master/src/vpnserver/CMakeLists.txt#L26
>
> what happens:
>
> (*) deb installs files to /usr/libexec
> (*) cmake sets location as /usr/local/libexec
>

It looks like your get default "/usr/local" prefix from somewhere.
The installation prefix of CPack is controlled by the
https://cmake.org/cmake/help/latest/variable/CPACK_PACKAGING_INSTALL_PREFIX.html
variable.
Each CPack generator has a default value for that (if you don't specify it).

How do run cpack?
Do you do "make package" or do you run
cpack -G DEB

Which version of cmake/cpack are you using?


> as a result: it does not work (systemd cannot find executable)
>
> https://gitlab.com/chipitsine/SoftEtherVPN/-/jobs/110262386
>
> I enabled "set(CPACK_DEBIAN_PACKAGE_DEBUG ON)", but it did not provide me
> a clue.
>

DEB generator is not as verbose as I thought.

Do you generate RPM as well? RPM is more verbose and leaves you log file in
_CPack_Packages/<yoursystem>/RPM/

Is the RPM containing what you expect?

-- 
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20181020/9731210a/attachment.html>


More information about the CMake mailing list