Re: [CMake] How to on multiple RPM packages

2016-01-15 Thread Domen Vrankar
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


Re: [CMake] How to on multiple RPM packages

2016-01-15 Thread Domen Vrankar
Hm I've accidentally dropped cmake mailing list when replying
before... Sorry about that.

> Im using "bin" and "devel" as component names. I tried next with upper and
> lower case in the properties but no difference.
> it's about what you see in the RPM header using "rpm -qlip name.rpm" ...

Component name changing patch was already applied in git and will be
available in next CMake release.
Until then you could patch your CPackRPM.cmake file (comes with CMake
installation) with this patch:

https://cmake.org/gitweb?p=cmake.git;a=commit;h=c926efa


> a) Also it is documented  CPACK_RPM_DEVEL_PACKAGE_DESCRIPTION has no
> effect I always get "This is an installer created using CPack
> (https://cmake.org). No additional installation instructions provided."
> b) Same for summary. I always get "NGSelector built using CMake"

It's possible that you are using an older version of CPack that
doesn't support this per component feature. This was introduced in
CPack version 3.2. Before only non component versions of description
of summary were supported.

> c) I cannot specify different groups like "Application" and "Library"?
Fix is the same patch as for name.


> d) Can I get rid of the "-bin" in the RPM file name?
Not at the moment... There are pending bug reports for this. You could
however use above patch to change package name and rename the file
name manually after generation.

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


Re: [CMake] How to on multiple RPM packages

2016-01-15 Thread Eric Noulard
Hi Thomas,

CPack RPM may generate several packages at once if you define COMPONENTS in
your project.

The behavior of CPackRPM w.r.t. COMPONENT packaging depends on

Some CPack COMPONENT generic variables, namelly:
CPACK_RPM_COMPONENT_INSTALL --> this one must be set to ON
CPACK_COMPONENTS_* variables
see: https://cmake.org/cmake/help/v3.4/module/CPackComponent.html

The bunch of RPM specific variables
CPACK_RPM__* variables
see  https://cmake.org/cmake/help/v3.4/module/CPackRPM.html

More references (some may be outdated) there:
https://cmake.org/Wiki/CMake:Component_Install_With_CPack
https://cmake.org/Wiki/CMake:CPackPackageGenerators#RPM_.28Unix_Only.29
http://cmake.3232098.n2.nabble.com/CPack-RPM-with-COMPONENTS-packaging-td7583729.html

2016-01-15 9:05 GMT+01:00 Thomas Lehmann :
>
> Hi,
>
> We are currently looking forward to migrate to CMake and
> we are struggling a bit with cpack.
>
> The first project we migrate provides a executable binary but also
> a library and its headers.
>
> 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
>
> Anybody who can help us with this?
>
> Regards,
> Thomas
>
> --
>
> 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




--
Eric
-- 

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

[CMake] How to on multiple RPM packages

2016-01-15 Thread Thomas Lehmann
Hi,

We are currently looking forward to migrate to CMake and
we are struggling a bit with cpack.

The first project we migrate provides a executable binary but also
a library and its headers.

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

Anybody who can help us with this?

Regards,
Thomas
-- 

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