[CMake] Install COMPONENT bug?
Eric Noulard
eric.noulard at gmail.com
Thu Jun 21 02:38:42 EDT 2012
2012/6/21 Bill Lorensen <bill.lorensen at gmail.com>:
> According to the documentation, an install command like this:
> INSTALL (
> TARGETS myTarget
> EXPORT myExportedTargets
> RUNTIME DESTINATION bin COMPONENT component1
> LIBRARY DESTINATION lib COMPONENT component2
> ARCHIVE DESTINATION bin COMPONENT component3
> )
>
> should produce 3 components. And I've seen this pattern in a number of
> cmake files. Yet, it only produces one (the first) component.
>
> This cmake file illustrates the problem:
>
>
> cmake_minimum_required(VERSION 2.8)
> project(bug)
>
> add_executable(myTarget a.cxx)
> target_link_libraries(myTarget -lm)
> INSTALL (
> TARGETS myTarget
> EXPORT myExportedTargets
> RUNTIME DESTINATION bin COMPONENT component1
> LIBRARY DESTINATION lib COMPONENT component2
> ARCHIVE DESTINATION bin COMPONENT component3
> )
>
> get_cmake_property(PROPS COMPONENTS)
> message(STATUS "COMPONENTS: ${PROPS}")
>
> -------------------------
> the message produces:
> -- COMPONENTS: component1
In this case the target is an executable which is only "runtime" so
this does not look like a bug.
Did you try with a target which is a library?
--
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org
More information about the CMake
mailing list