[CMake] [binary dir] breaks INSTALL(...) if added
to ADD_SUBDIRECTORY(...)
Filipe Sousa
filipe at ipb.pt
Sat Oct 21 12:39:04 EDT 2006
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://public.kitware.com/pipermail/cmake/attachments/20061021/48736677/signature.pgp
More information about the CMake
mailing list