[CMake] More than one package source for a project.
Eric Noulard
eric.noulard at gmail.com
Fri Jun 15 04:24:13 EDT 2012
2012/6/14 Darryl L. Pierce <dpierce at redhat.com>:
> Our project has several subprojects to it. What I would like to do is
> have some of those subprojects to package up their sources, which
> includes a generated file, as a separate source tarball from the overall
> one that's created with make package_source.
This cannot be done "out-of-the box" by CPack because
CPack cannot currently be included several time:
see e.g.:
http://public.kitware.com/Bug/view.php?id=10751
That said, "Packaging" source is not done as binary package at all.
if you have a look at the CPackSourceConfig.cmake file generated by
include(CPack)
you'll see that the main "driver" is the
CPACK_INSTALLED_DIRECTORIES variable.
This variable shall contains a list of pair.
Each pair is
a) the name of the directory to be "installed"
b) the name of the subdirectory where it will be installed in the
destination package
source package generate something like:
SET(CPACK_INSTALLED_DIRECTORIES "/path/to/source;/")
> Can someone point me to an example of doing such a thing?
You should be able to craft/generate your own set of
CPackSourceConfig<Project>.cmake
and call
cpack --config CPackSourceConfig<Project>.cmake
for each file.
--
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org
More information about the CMake
mailing list