Iosif, that's exactly it, I was not paying attention to the [ ] in the
docs!  Thanks for your help.

On Mon, Oct 31, 2016 at 2:57 PM, iosif neitzke <
iosif.neitzke+cm...@gmail.com> wrote:

> Try something like:
> INSTALL( TARGETS foo ARCHIVE DESTINATION lib COMPONENT bar
>                      RUNTIME DESTINATION bin COMPONENT bar
>                      LIBRARY DESTINATION bin COMPONENT bar )
>
> The nesting of brackets "[]" in docs [0], requires a COMPONENT keyword
> and argument (should you choose to use components) for each kind of
> target file keyword (ARCHIVE, RUNTIME, LIBRARY, etc..) you use.
>
> I believe you get the puzzling behavior varying with STATIC versus
> SHARED library type because of the way the command is parsed.  When
> building a STATIC library, there is only an ARCHIVE, which has no
> COMPONENT listed, so you get "Unspecified" when listing components.
> When building a SHARED library on non-DLL platforms, the binary is a
> LIBRARY target, which has the COMPONENT "bar" listed.
>
> Each kind of target file keyword (ARCHIVE, RUNTIME, LIBRARY, etc..) has
> its own list of subsequent properties.
>
>
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to