[CMake] how to debug CPack creation

Илья Шипицин chipitsine at gmail.com
Sat Oct 20 04:53:48 EDT 2018


сб, 20 окт. 2018 г. в 13:30, Eric Noulard <eric.noulard at gmail.com>:

>
>
> 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.
>

exactly.


> 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
>

I run:

./configure
make -C tmp package


> cpack -G DEB
>
> Which version of cmake/cpack are you using?
>

3.9.6


>
>
>> 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?
>


I did not check it yet.


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


More information about the CMake mailing list