[CMake] Building multiple Debian packages from one source

2012-11-27 Thread Patrick Nowak

Hi,

I am currently trying to build more then one Debian package from my 
sources. One package should contain the shared lib and the binary and 
should simply be called projectname-1.0.0.deb and the other one should 
contain the headers and optionally a static lib and should be called 
projectname-1.0.0-dev.deb.


I found this post ( 
http://cmake.3232098.n2.nabble.com/Multiple-Package-Generators-and-add-package-command-td6067405.html), 
possibly describing what to do but it doesn't seem to work for me. I 
still only get one package containing the same stuff it contained before 
adding the COMPONENT statement to my INSTALLs and adding 
cpack_add_component. Is this approach described in this post the right 
approach at all for my desired goal? If so:


Are cpack_add_component_group and cpack_add_install_type mandatory? How 
do I set the file name for every component respectively package?


If not: Is this even possible with CMake without having to 
CMakeLists.txt files and changing them for every desired package?


Best regards,
Patrick
--

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Building multiple Debian packages from one source

2012-11-27 Thread Eric Noulard
2012/11/27 Patrick Nowak pa.no...@tu-bs.de:
 Hi,

 I am currently trying to build more then one Debian package from my sources.
 One package should contain the shared lib and the binary and should simply
 be called projectname-1.0.0.deb and the other one should contain the headers
 and optionally a static lib and should be called projectname-1.0.0-dev.deb.

 I found this post (
 http://cmake.3232098.n2.nabble.com/Multiple-Package-Generators-and-add-package-command-td6067405.html),
 possibly describing what to do but it doesn't seem to work for me. I still
 only get one package containing the same stuff it contained before adding
 the COMPONENT statement to my INSTALLs and adding cpack_add_component.

You should enable component packaging for the DEB generator:
set(CPACK_DEB_COMPONENT_INSTALL 1)

see:
cpack --help-variable CPACK_GENNAME_COMPONENT_INSTALL

for backward compatibility reason some CPack generators (including DEB)
default to monolithic installer
http://www.vtk.org/Wiki/CMake:Component_Install_With_CPack#Enabling_Component_Packaging

 Is this approach described in this post the right approach at all for my
 desired goal?

Yes it should work, read the Wiki as well in order to get the big picture.
There is one limitation you won't able to overcome for now is the naming scheme
makes it impossible to have a component package named: projectname-1.0.0.deb
you will always get projectname-1.0.0-compName.deb

see this bug/features request:
http://public.kitware.com/Bug/view.php?id=12997

and the related ones.

 Are cpack_add_component_group and cpack_add_install_type mandatory? How do I
 set the file name for every component respectively package?

Nope.

 If not: Is this even possible with CMake without having to CMakeLists.txt
 files and changing them for every desired package?

I don't understand this?

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

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Building multiple Debian packages from one source

2012-11-27 Thread Patrick Nowak

Hi Eric,

thanks, set(CPACK_DEB_COMPONENT_INSTALL 1) solved my problem.

Best regards,
Patrick

Am 27.11.2012 14:17, schrieb Eric Noulard:

2012/11/27 Patrick Nowak pa.no...@tu-bs.de:

Hi,

I am currently trying to build more then one Debian package from my sources.
One package should contain the shared lib and the binary and should simply
be called projectname-1.0.0.deb and the other one should contain the headers
and optionally a static lib and should be called projectname-1.0.0-dev.deb.

I found this post (
http://cmake.3232098.n2.nabble.com/Multiple-Package-Generators-and-add-package-command-td6067405.html),
possibly describing what to do but it doesn't seem to work for me. I still
only get one package containing the same stuff it contained before adding
the COMPONENT statement to my INSTALLs and adding cpack_add_component.

You should enable component packaging for the DEB generator:
set(CPACK_DEB_COMPONENT_INSTALL 1)

see:
cpack --help-variable CPACK_GENNAME_COMPONENT_INSTALL

for backward compatibility reason some CPack generators (including DEB)
default to monolithic installer
http://www.vtk.org/Wiki/CMake:Component_Install_With_CPack#Enabling_Component_Packaging


Is this approach described in this post the right approach at all for my
desired goal?

Yes it should work, read the Wiki as well in order to get the big picture.
There is one limitation you won't able to overcome for now is the naming scheme
makes it impossible to have a component package named: projectname-1.0.0.deb
you will always get projectname-1.0.0-compName.deb

see this bug/features request:
http://public.kitware.com/Bug/view.php?id=12997

and the related ones.


Are cpack_add_component_group and cpack_add_install_type mandatory? How do I
set the file name for every component respectively package?

Nope.


If not: Is this even possible with CMake without having to CMakeLists.txt
files and changing them for every desired package?

I don't understand this?



--

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake