On 2013-04-22 18:12, Robert Dailey wrote:
I want to setup a target's header files to be copied to a separate
directory after that target is built. Any dependent targets will
reference the INSTALLED header files, so they must be copied after
that target is built and prior to any other targets (that depend on
it) that get built.
Is there a way to do this? Right now I use INSTALL( FILES ) but this
isn't target-specific. Thanks.
I do something similar, although I wouldn't recommend using INSTALL as
it requires re-running CMake any time you change a header.
What I do is have a function that takes a list of public headers, create
a target e.g. myLibrary-headers with custom commands to copy the headers
as needed (i.e. a copy command per header that depends on the original
header), and then make myLibrary depend on this target.
--
Matthew
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake