[CMake] Building a FreeBSD port with CPack

Alexander Neundorf a.neundorf-work at gmx.net
Wed Jun 17 16:36:16 EDT 2009


On Wednesday 10 June 2009, Jean-Pierre Bergamin wrote:
> Hello
>
> > On Wednesday 27 May 2009, Jean-Pierre Bergamin wrote:
> > > Has anyone already tried to build a proper FreeBSD port with CPack?
> > > I think it would not be too hard to build a generator that creates a
> > > Makefile to build a FreeBSD port. Is there any documentation how to
>
> create
>
> > > a new CPack generator?
> >
> > Not really.
> > Look at the existing generators, they are not hard, e.g. the zip or
>
> tar-based
>
> > ones.
>
> I'm playing around with the FreeBSD port generator and at least it compiles
> and does "something" already. :-)
>
> I need to create a file "pkg-plist" that contains a list of all files the
> BSD port will contain, which are simply all files that cmake installs. The
> vector "files" that is passed to my overridden method CompressFiles() only
> contains executables and libraries that are marked for installation in the
> CMakeLists.txt files with "install(TARGETS ...)". All files that get
> installed with "install(FILES ...)" and "install(PROGRAMS ...)" do not show
> up in the "files" vector. How can I get a list of all files that get
> installed.

You mean the files vector in the CompressFiles() function: 

int cmCPackDebGenerator::CompressFiles(const char* outFileName,
  const char* toplevel,
  const std::vector<std::string>& files)

?
It really should have all files, otherwise the tar.gz or the deb files would 
not contain all files. Are you sure something is missing there ?

Alex


More information about the CMake mailing list