[CMake] CPack and configure_file

Tobias Ellinghaus houz at gmx.de
Wed Jan 12 14:00:30 EST 2011


Am Tuesday 11 January 2011 schrub Eric Noulard:

[...]

> in fact I think the "real" source for this is the fact the CPack lacks
> the notion
> of "EXTRA" distribution file which is available with autoconf, EXTRA_DIST
> var
> http://www.gnu.org/software/hello/manual/automake/Basics-of-Distribution.h
> tml or the dist-hook:
> http://www.gnu.org/software/hello/manual/automake/The-dist-Hook.html#The-di
> st-Hook
> 
> The fact is CPack doesn't know much about "source package" and
> in fact it package source using the CPACK_INSTALLED_DIRECTORIES directory
> list. (look at the generated CPackSourceConfig.cmake)
> 
> I think you can "emulate" the extra thing of autoconf.
> If you want ot package "more" than the source tree with
> "package_source" you can try
> the following in your main CMakeLists.txt (before include(CPack))
> 
> SET(CPACK_SOURCE_INSTALLED_DIRECTORIES
> "${CMAKE_SOURCE_DIR};/;${CMAKE_BINARY_DIR}/extra;/extra")
> 
> then the content of the directory
> ${CMAKE_BINARY_DIR}/extra will added in the package source archive
> inside "extra" dir.
> 
> it should work.

It does indeed work perfectly IFF I don't add CMAKE_BINARY_DIR to 
CPACK_SOURCE_IGNORE_FILES which is needed when someone creates a folder (let's 
say "build/") inside of the source dir and runs cmake from this folder which 
seems to be quite wide spread.

Is it possible to have CPack somehow give more authority to 
CPACK_SOURCE_INSTALLED_DIRECTORIES than CPACK_SOURCE_IGNORE_FILES?

Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110112/8d705f3d/attachment.pgp>


More information about the CMake mailing list