[CMake] [binary dir] breaks INSTALL(...) if added to ADD_SUBDIRECTORY(...)

Peter Visser pervulgo at gmail.com
Sat Oct 21 13:19:19 EDT 2006


Thanks for the advice, but I cannot find these directives in the
documentation (http://www.cmake.org/HTML/Documentation.html).
Perhaps I'm looking in the wrong place, where do I need to look for the
documentation?

Thanks again,

Peter.

On 10/21/06, Filipe Sousa <filipe at ipb.pt> wrote:
>
> Peter Visser wrote:
> > Hello,
> >
> > The following example works fine:
> >
> > ----
> > In the top CMakeLists.txt
> > ADD_SUBDIRECTORY (Example1)
> > ADD_SUBDIRECTORY (Example2)
> > ----
> > In the subdirectories Example1/Example2
> > INSTALL(TARGETS Example1/Example2
> >         RUNTIME DESTINATION bin
> >             LIBRARY DESTINATION lib
> >             ARCHIVE DESTINATION lib
> > )
> > -----
> > In the INSTALL both the executables Example1 and Example2 are added to
> > the bin directory
> >
> > However adding a [binary dir] to the ADD_SUBDIRECTORY(...) breaks the
> > INSTALL
> > ----
> > In the top CMakeLists.txt
> > ADD_SUBDIRECTORY (Example1 foo)
> > ADD_SUBDIRECTORY (Example2 foo)
> > ----
> > In this case only Example2 is added to the bin directory. (Only the last
> > occurence of the ADD_SUBDIRECTORY(...) is added)
> > Is this behaviour intentionally or do I misunderstand the [binary dir]
> > argument.
> >
>
> If you want control the output of your library/executable target you
> have to use LIBRARY_OUTPUT_PATH/EXECUTABLE_OUTPUT_PATH.
>
>
> --
> Filipe Sousa
>
>
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20061021/6f52d760/attachment.html


More information about the CMake mailing list