[CMake] Accurate package_source

Eric Noulard eric.noulard at gmail.com
Fri Nov 2 05:21:36 EDT 2007


2007/11/2, Thomas Sondergaard <ts_news1 at sondergaard.cc>:
> It seems that package_source just packs the source directory. I'd like
> it to work like autotools make DIST, ie it packs the source files plus
> whatever is put in EXTRA_DIST.

I remember the pros/cons of cpack
(the command used when "make package_source" is called)
was already discussed on the list.

May be you can search the ML archive:
http://www.cmake.org/pipermail/cmake/

>
> How can I do that?
>

I'm not actively using autotools since a while but
I think "make dist" precisely DOES NOT package all the source
but only the file included in some automake rules.

http://www.gnu.org/software/automake/manual/automake.html#Dist

With CPack the control of what is packaged and what
is not is more "basic"

take all the file in the source tree
minus those which match the content
CPACK_SOURCE_IGNORE_FILES

I usually use:
SET(CPACK_SOURCE_IGNORE_FILES
"/CVS/;/\\\\.svn/;\\\\.swp$;\\\\.#;/#;.*~;cscope.*")

I you want to include generated files (which are in the build tree)
I don't know if it's possible to do it without putting the generated
file in the source tree.

-- 
Erk


More information about the CMake mailing list