[CMake] Installation package

Eric Noulard eric.noulard at gmail.com
Wed Jun 10 12:42:46 EDT 2009


2009/6/10 Pascale B <chose29 at hotmail.com>:
> Hi,
>
>    The RPATH solution works locally only, on my computer only when used with
> the make install command.

That's the expected behavior.

> But now, I seem to have problem to use Cmake to
> create RPMs and I think it has to do with the root directory of rpmbuild. As
> I wrote previously, I use CPack to create a tar.Z file successfully. In my
> CMakeLists.txt, I added as suggested:
>
> ...
> SET(CPACK_GENERATOR "TZ;RPM")
> SET(CPACK_RPM_PACKAGE_DEBUG 1)
>
> INCLUDE(CPack)
> ...
>
> Following this, _CPack_Packages is created in the location "Where to build
> the binaries" specified in cmake Gui (what is the command to fetch this
> variable from CMakeLists.txt?). Under _CPack_Packages is created a directory
> structure Linux>RPM and Linux>TZ.
>
> When typing : make package
>
> I get the following error:
>
> CPack: Finalize package
> CPack Error: Problem copying the package:
> /media/disk/MyApp/MyApp_sources/lnx/_CPack_Packages/Linux/RPM/MyApp_sources-0.1.1-Linux.rpm
> to /media/disk/MyApp/MyApp_sources/lnx/MyApp_sources-0.1.1-Linux.rpm
> CPack Error: Error when generating package: drop_sources
> make: *** [package] Error 1
>
> and the following in the rpmbuild.err file:
>
> error: File not found by glob:
> /home/pascale/rpmbuild/BUILDROOT/MyApp_sources-0.1.1-1.x86_64/*
>     File not found by glob:
> /home/pascale/rpmbuild/BUILDROOT/MyApp_sources-0.1.1-1.x86_64/*
>
> How can the desired folder be created automatically? Or should I specify
> another folder? I notice that the folder created by CPack has the name
> ..Linux wheras packaging seems to be looking for ...x86_64?

Which version of CMake/CPack are you using?

Could you show us some if not all your
install(... ) command?
and/or tell us if you use "absolute path" as destination?

What is your linux distribution ?

Can you tell me which version of rpmbuild is installed on your system
using: rpmbuild --version

There is know issue with rpmbuild version 4.6.x and up.
see:
http://www.cmake.org/Wiki/CMake:CPackPackageGenerators#CPack_RPM_currently_pending_bugs.2Ffeatures

The rpm 4.6.x issue in in CVS HEAD but does not [yet] reached 2.6.x.

-- 
Erk


More information about the CMake mailing list