[CMake] Install COMPONENT bug?
Bill Lorensen
bill.lorensen at gmail.com
Thu Jun 21 08:08:31 EDT 2012
Eric,
My bad. I see all three components if the target includesan
executable, static lib and shared lib.
Thanks,
Bill
On Thu, Jun 21, 2012 at 2:38 AM, Eric Noulard <eric.noulard at gmail.com> wrote:
> 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
--
Unpaid intern in BillsBasement at noware dot com
More information about the CMake
mailing list