[CMake] CPack: Adding a file to package_source target

Adolfo Rodríguez dofo79 at gmail.com
Thu Feb 5 11:08:37 EST 2009


Hello,

I have a project with the following structure:

trunk
  |-src
  |-build_dir1
  |-build_dir2
  |-another_dir
  |-CMakeLists.txt
  |-unimportant_file
  |-another_unimportant_file

I am configuring CPack to make source packages. The content I'm interested
in packaging is folder src (and all its contents) and the shown
CMakeLists.txt file, and ignore everything else.
I have successfully packaged src with

set(CPACK_SOURCE_INSTALLED_DIRECTORIES "${CMAKE_SOURCE_DIR}/src;./src")

and now I would like to include the CMakeLists.txt file. Since the trunk
folder is full of many things I do not wish to install, I'd rather not use
CPACK_SOURCE_IGNORE_FILES and specify a cunch of complex rules, but tell
CPack to add an additional file. Is this possible?

I was trying out CPACK_INSTALL_COMMANDS, but I haven't figured out how to
use it, and the variable is AFAIK pretty much undocumented (either in the
book or online).

Any help would be much appreciated.

Adolfo Rodríguez Tsouroukdissian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090205/93160e21/attachment.htm>


More information about the CMake mailing list