I've accidentally dropped the mailing list in reply:

> I do not find an example on how to provide separate RPM's
> for them; one for the binary and one for the headers+library.
> The required results (rough example):
>
> - foo-1.2.3.4-1.x86_64.rpm
> - libfoo-1.2.3.4-1.x86.64.rpm

You have to provide COMPONENT and name in install commands:
install(TARGETS prog DESTINATION foo COMPONENT binary)
install(FILES someheader.hpp DESTINATION foo COMPONENT headersandlibs)

set that you wish to package components:
set(CPACK_RPM_COMPONENT_INSTALL "ON")

and enable RPM packaging generator:
set(CPACK_GENERATOR "RPM")

You can also set other per component properties to be used by
CPackRPM. See the documentation here:
https://cmake.org/cmake/help/v3.4/module/CPackRPM.html

All of this should be done before calling:
include(CPack)

Hope this helps.

Regards,
Domen
-- 

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