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.
Cheers,
Peter.
_______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake