[CMake] make package_source and binary subdir of source
Eric Noulard
eric.noulard at gmail.com
Sat Mar 8 13:21:44 EST 2008
2008/3/8, Hendrik Sattler <post at hendrik-sattler.de>:
> Am Samstag 08 März 2008 schrieb Eric NOULARD:
>
> > I remember a post from Bill which said that it was difficult for CMake
> > to know what was generated or not because a built may need several
> > CMake run before obtaining a functional build tree.
> > However remembering what is a source seems easier, or am I wrong?
>
> Just assume you create files with a tool. You actually build them with a
> custom command. Assume you are not allowed to distribute that program but the
> files that it creates can be distributed.
Yes precisely you are right.
But usually in this case...
> They are not source, actually, but you may want to ship them.
You find those files inside ADD_LIBRARY or ADD_EXECUTABLE.
> Building a list of source files could be handled like ACLs are usually
> handled.
I'm not sure to understand what you mean but
> This allowes for mixed inclusion and exclusion rules.
This was precisely my idea of using:
set_source_files_properties(file1 file2
PROPERTIES CPACK_PACKAGE_SOURCE true)
and/or
CPACK_SOURCE_ADD_FILES
for inclusion
and
CPACK_SOURCE_IGNORE_FILES for exclusion
we may add
set_source_files_properties(file1 file2
PROPERTIES CPACK_PACKAGE_SOURCE false)
for the sake of symmetry.
--
Erk
More information about the CMake
mailing list