[CMake] proper setup to create file and have it installed

edA-qa mort-ora-y eda-qa at disemia.com
Tue Dec 28 03:10:56 EST 2010


On 12/27/2010 09:51 PM, Michael Hertling wrote:
> You might use the ALL option of ADD_CUSTOM_TARGET() to incorporate the
> language target in CMake's "all" target which, in turn, is built as a
> prerequisite of the "install" target. Alternatively, if the language
> file should be installed only if the language target has been built
> before, you might use the OPTIONAL flag of the INSTALL(FILES ...)
> command to avoid the fatal error due to a missing file.

Thank you, that works.

Now, a related question. Is there some way to successively add files
dependencies to an add_custom_target? I know that DEPENDS does this, but
it'd be nice if I could create a "install-files" target and in various
points in the file add the files which are needed as dependencies.
Otherwise I will basically have a new target for every install line
which installs a generated file.

-- 
edA-qa mort-ora-y
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

	BigTPoker - Poker fun and games

		http://BigTPoker.com/
	
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Sign: Please digitally sign your emails.
Encrypt: I'm also happy to receive encrypted mail.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101228/27d1eb56/attachment.pgp>


More information about the CMake mailing list