Metriche repository
- Star
- (13.499 stelle)
- Metriche merge PR
- (Nessuna PR mergiata in 30 g)
Descrizione
Describe the issue
I am trying to package abseil for installation into an RPM-based environment. CMake/CPack makes this very easy. However, in accordance with the traditional way this is done, I wish to create two RPMs:
- one with the libraries themselves, meant for installation as a runtime dependency of projects that dynamically link against abseil
- and one with everything else - header files, cmake targets, etc., meant for installation when developing a project against abseil. This is common called the "devel" package on RPM-based systems.
CPack allows you to control how install() calls are mapped to RPMs, but only if the install() call specifies a COMPONENT. Abseil's cmake configuration doesn't not specify COMPONENTs in the install() commands, so I cannot split them into two separate RPMs.
Steps to reproduce the problem
There aren't really "steps" for this issue, as there is, AFAIK, no way that this "should" work, (yet!). However, I can provide the steps for packaging abseil into two RPMs, assuming there were COMPONENTs defined.
- Create a new CMake project
- Add abseil-cpp as a subdirectory to that project
- Enable install targets for abseil (they are off by default when using abseil as a subproject)
- Configure per-component group RPM generation and include CPack
- Declare runtime/devel component groups using
cpack_add_component_group. One RPM will be built per component group - Map components to groups using
cpack_add_component(<component> GROUP <group>). This is the step that cannot be done because all files installed by abseil currently belong to the same default component. - Build project and run
cpack.
Cpack can now produce an abseil "runtime" RPM and a "devel" RPM.
What version of Abseil are you using?
20230802.1
What operating system and version are you using?
Rocky Linux 8
What compiler and version are you using?
gcc 8.5.0
What build system are you using?
cmake 3.27.7
Additional context
No response