[CMake] CPack source package path

Adolfo Rodríguez dofo79 at gmail.com
Mon Mar 9 09:26:20 EDT 2009


On Mon, Mar 9, 2009 at 11:47 AM, Eric Noulard <eric.noulard at gmail.com>wrote:

> 2009/3/9 Adolfo Rodríguez <dofo79 at gmail.com>:
> > Hi,
> >
> > I have set up CPack to generate source and binary packages with the TGZ
> > generator. As I understand, the compressed tar consists of the files
> located
> > in:
> > ${CMAKE_BINARY_DIR}/_CPack_Packages/Linux-Source/TGZ/
> >
> > I want to exclude some files from the package_source target, so I need to
> > reference the above path. Are there any CMAKE/CPACK variable that
> contains
> > the
> > _CPack_Packages/Linux-Source/TGZ/ part of the path? So far I haven't
> found
> > any, and am currently hardcoding this string in my CPack scripts.
> >
> > Any hints would be appreciated,
>
> I'm not sure but
> if I remember well it should be  CPACK_TOPLEVEL_DIRECTORY.



Hmm, I tried querying the names of all active variables and their values
(after including CPack, of course) by doing

get_cmake_property(res VARIABLES)
foreach (i ${res})
  message(STATUS ">> ${i} = ${${i}}")
endforeach (i)

Grepping these results I found no variable named CPACK_TOPLEVEL_DIRECTORY,
nor a variable whose value contained "_CPack_Packages/Linux-Source/TGZ/". I
don't know if grepping the source code would help much, since CMake/CPack
are apparently not exposing any variables with the required information.
Might give it a try, though. Thanks.

Further clues would be greatly appreciated...

Adolfo


>
>
> The CPack RPM generator has a "debugging" mode during which
> it shows you some of thoses vars.
>
> You may try:
> cpack -D CPACK_RPM_PACKAGE_DEBUG=1 -G RPM
>
> then induce the values for the CPack TGZ generator.
>
> CPack RPM is a binary generator so source generator
> may use different vars. :-(
>
> The next step would be to find+grep the source code :-)
> --
> Erk
>



-- 
Adolfo Rodríguez Tsouroukdissian

Robotics engineer
PAL ROBOTICS S.L
http://www.pal-robotics.com
Tel. +34.93.414.53.47
Fax.+34.93.209.11.09
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090309/86a57c6f/attachment.htm>


More information about the CMake mailing list