Hi,

> I have a very standard CPack configuration for deb package. I have two
> questions:
>
> 1. I generate the deb with: cpack --config CPackConfig.cmake -G "DEB"
>
> This is supposedly a binary package but when I install it on the machine I
> see header files being installed in /usr/include.
>
> Is this normal?

I'm guessing that CPackConfig.cmake is generated by cmake and not hand written.

CMake generates CPackConfig.cmake that can be used to create a package
with content listed with 'install()' commands (see:
https://cmake.org/cmake/help/v3.5/command/install.html). If those
commands contain header files then those files will be part of the
package. You could also split packages between bin and dev packages by
using COMPONENT attribute in install commands and then generating
component packages - one per component.

> 2. Header files are installed into /usr/include but there is one problem:
> other projects using the library are including header files with #include
> <libname/SomeHeader.h> as a standard practice.
>
> So I actually want them installed in /usr/include/libname instead. After
> scouring the CPack variables in documentation I didn't really find anything
> suitable to do this. Is it possible to achieve?

This would have to be changed in CMakeLists.txt (install commands) or
is possibly already written with prefix variable in mind in which case
you have to look into CMakeLists.txt install commands and set the
variable that is used there for this purpose.

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