[CMake] Howto use targets from several directories in the install clause?

Dmytro Ovdiienko dmitriy.ovdienko at gmail.com
Wed May 20 07:36:27 EDT 2009


Hello Alexander,

Thank you for your reply.

I've made changes as you suggested. It works for now. But IMHO it is
incorrect.  Only DLL root project "knows" all details of installation but
not sub-project.

What if I have several projects based on the same sub-projects? They have
different installation path.

Regards.

Dima

2009/5/19 Alexander Neundorf <a.neundorf-work at gmx.net>

> On Tuesday 19 May 2009, Dmytro Ovdiienko wrote:
> > Hi all,
> >
> > I'm trying to write install instruction for my main project (DLL) that
> > consists from several projects (LIBs). This instruction should copy all
> > public headers from all dependent targets to the destination directory.
> >
> > I expected to use following sample but it is erroneous:
> >
> > install (
> >     TARGETS
> >         utils
> >         system
> >         types
> >     PUBLIC_HEADER DESTINATION
> ${${PROJECT_NAME}_BINARY_DIR}/install/headers
> >     )
>
> I think you have to write the install() command for a target in the
> directory
> where the target is created. I think installing them from a different
> CMakeLists.txt is not supported.
>
>
> Alex
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090520/7c3c4618/attachment.htm>


More information about the CMake mailing list