[CMake] Why install(TARGETS ...) from current CMakeList only?

Petr Kmoch petr.kmoch at gmail.com
Mon Jul 29 09:26:26 EDT 2013


Hi all.

We have a setup where subprojects register "items" they wish to install,
and the top-project later processes them (removing some, modifying others
etc.) and issues install(...) commands for them. Currently, this does not
work for install(TARGETS ...), as that command can only be given in the
CMakeList which defined the target.

I'm curious about the reason for this limitation - why can't a target's
installation be controlled by a different CMakeLists.txt file? Could anyone
shed some light on this?

Thanks.

Petr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130729/eef9ceae/attachment.htm>


More information about the CMake mailing list