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

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to