[CMake] copying the contents of a directory with cpack
Bill Hoffman
bill.hoffman at kitware.com
Tue Sep 18 09:48:01 EDT 2007
Alan W. Irwin wrote:
> On 2007-09-17 20:31-0400 Bill Hoffman wrote:
>
>> Niall Dalton wrote:
>>> Hi,
>>>
>>> I have a custom target that creates doxygen documentation from my C
>>> header files. I'd like, as part of my cpack configuration in my main
>>> CMakeLists.txt, to copy the directory containing the doxygen output
>>> into the .tar.gz package.
>>>
>>> What is the simplest way to do this?
>> Basically, cpack just uses whatever make install does. So, you would
>> need to use the install commands in cmake. Once those are working
>> cpack should work.
>
> That advice is correct for generating binary distributions with "make
> package", but in case you wanted to include the doxygen output in a
> source
> distribution with the "make package_source" command, then all you have
> to do
> is make your build tree a subdirectory of your source tree or copy the
> doxygen output from the build tree to the source tree. By default, "make
> package_source" packages everything in the source tree, and you use a
> regex
> expression variable called CPACK_SOURCE_IGNORE_FILES to ignore
> anything you
> do not want. To see how to set this up, have a look at the top-level
> CMakeLists.txt file of CMake itself.
Since doxygen is output from running the build, a source package would
not be
a good idea. I would add custom commands to run doxygen and create the
docs,
then add rules to install them, and then cpack should install them as well.
-Bill
More information about the CMake
mailing list