[CMake] CPack different libraries in DEB compared to RPM

Eric Noulard eric.noulard at gmail.com
Tue Jan 29 13:06:27 EST 2013


2013/1/29 upprc04 <upprc04 at gmail.com>:
> I'm running across an issue where I have some utility libraries that are only
> needed in the debian.  I currently have them added to both the debian and
> RPM using CPack and CMake.  What would I need to change in my CMake files to
> include a specific set of libraries to only be included in the debian and
> not included in the RPM.

You "just" have to not install (or even not build) the deb-specific part when
building for RPM.

It is easily done with separate build-tree,

You may use CPACK_PROJECT_CONFIG_FILE and
override CPACK_INSTALL_CMAKE_PROJECTS in RPM/DEB specific sections.
In that later case you need to define appropriate COMPONENT (see
install(... COMPONENT...)
argument ) in order to be able to install only the needed ones in each case.


-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org


More information about the CMake mailing list