[CMake] Using cpack on an install directory

Eric Noulard eric.noulard at gmail.com
Fri Nov 18 08:10:41 EST 2016


2016-11-18 13:35 GMT+01:00 <ycollette.nospam at free.fr>:

> Hello,
>
> I would like to know if it's possible to use cpack on an install directory
> (without CMakeLists.txt file).
> I've got a "complicated" build:
> - one build in 64 bits
> - one build in 32 bits
> - one with license check
> - one without
>
> Every thing is installed in an install directory (64 bits files went to
> bin/x64 and 32 bits files into bin/x32).
> I wante to use cpack by configuring a CPackConfig.cmake file but it's no
> clear which variable I must fill to be able to pack my install directory).
>
> For example: SET(CPACK_INSTALL_CMAKE_PROJECTS "/Users/jenkins/workspace/
> MyBuild/build;MyProject;ALL;/")
> I don't think this variable is required if I use cpack on a non cmake
> directory ...
>


Yep you are right. When you barely want to package a (set of) directory
I think you should try to set:

CPACK_INSTALLED_DIRECTORIES
which
should contain (list of) pairs of <directory> and <subdirectory>. The
<subdirectory> can be '.' to be installed in the toplevel directory of
installation.

there is almost no documentation about this but this is used for
"package_source" by cpack.itself.
see the any " CPackSourceConfig.cmake" generated for a CMakeified project
using CPack.




-- 
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20161118/8bd29a37/attachment.html>


More information about the CMake mailing list