[CMake] Using cpack on an install directory

ycollette.nospam at free.fr ycollette.nospam at free.fr
Fri Nov 18 08:45:51 EST 2016


Thanks a lot, I will try this.

YC

----- Mail original -----
De: "Eric Noulard" <eric.noulard at gmail.com>
À: "Yann COLLETTE" <ycollette.nospam at free.fr>
Cc: "cmake" <cmake at cmake.org>
Envoyé: Vendredi 18 Novembre 2016 14:10:41
Objet: Re: [CMake] Using cpack on an install directory






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 


More information about the CMake mailing list