[CMake] Issues using CPack for making a debian package

Domen Vrankar domen.vrankar at gmail.com
Wed Mar 23 11:15:18 EDT 2016


> So, I've done some research and I found two things:
>  - There's a closed bug entry and a very recent patch
> (https://cmake.org/Bug/view.php?id=12431;
> https://cmake.org/gitweb?p=cmake.git;a=log) that will help fixing this;
>  - The documentation advises setting the CMAKE_INSTALL_RPATH variable (but
> doesn't give any clue as to what value it should be set to).
>
> However, I don't want to do that because:
>  a) it impacts the other use-cases;
>  b) the rpath will stay in the binaries delivered through the debian
> package.
>
> I'd like to point out that dpkg-shlibdeps has a `-l` option that looks to me
> like the best tool for the job (compared to the rpath solution); this option
> is used in actual debian packages.
>
>> -ldirectory
>>        Add directory to the list of directories to search for private
>> shared libraries (since dpkg 1.17.0). This option can be used multiple
>> times.
>
>
> I'm considering working my problem around by shipping a patched copy of
> CPackDeb.cmake, using this `-l` option. Has anyone another solution?

Other than disabling use of dpkg-shlibdeps with
CPACK_DEBIAN_PACKAGE_SHLIBDEPS nothing comes to mind.

Would you be willing to provide the patch with `-l` option for
inclusion into CPack and a minimal test CMakeLists.txt showing its
usage?

Thanks,
Domen


More information about the CMake mailing list