Hi, are static libraries able to be added to a component?

The following minimal example doesn't work as I expected:

CMAKE_MINIMUM_REQUIRED( VERSION 3.0.0 )
PROJECT( foo )

ADD_LIBRARY( foo foo.c )
INSTALL( TARGETS foo ARCHIVE DESTINATION lib
                     RUNTIME DESTINATION bin
                     LIBRARY DESTINATION bin
                     COMPONENT bar )

INCLUDE( CPack )

If I run "make list_install_components" it says "Unspecified"

However, if I add "SHARED" to the ADD_LIBRARY call (or set
BUILD_SHARED_LIBS), it lists the component as "bar" which is what I'd
expect.

Is this a bug, or by design?  I'm attempting to figure out how I can
separate shared/static libraries in my project for different install
types.  For example, if I am packaging a binary only install, I don't need
to install static libraries, but I would need the runtime libraries.

Dave
-- 

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