[CMake] Installation package

Pascale B chose29 at hotmail.com
Wed Jun 10 12:56:30 EDT 2009


Hi Eric,


 I use CMake 2.6, patch 4.
Fedora 10
rpmbuild version 4.6.1. What is the fix for the bug you mentioned?


> Could you show us some if not all your
> install(... ) command?

This is in the CMakeLists.txt in the directory where my binaries are located:

#________________________Install execs_____________________________
INSTALL(TARGETS App3D
    RUNTIME 
    DESTINATION MyApp/bin
    COMPONENT EXEC3D)

install(TARGETS App2D 
    RUNTIME
    DESTINATION MyApp/bin
    COMPONENT Exec2D)

This is in the CMakeLists.txt in the directory where my libraries are located:

#________________________Install library_____________________________
set(LIBRARY_OUTPUT_PATH ./../../../libs/libraryOne/lnx/lib)
INSTALL(TARGETS libraryOne
       LIBRARY DESTINATION MyApp/lib
       COMPONENT libraryOne)


And for a library located under another directory:

#________________________Install library_____________________________
#I set the output path this way:

set(LIBRARY_OUTPUT_PATH ./../../../libs/libraryTwo/lnx/lib)
INSTALL(TARGETS libraryTwo

       LIBRARY DESTINATION MyApp/lib

       COMPONENT libraryTwo)

Thanks again!
Pascale


> Date: Wed, 10 Jun 2009 18:42:46 +0200
> Subject: Re: [CMake] Installation package
> From: eric.noulard at gmail.com
> To: chose29 at hotmail.com
> CC: cmake at cmake.org
> 
> 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

_________________________________________________________________
Internet explorer 8 lets you browse the web faster.
http://go.microsoft.com/?linkid=9655582
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090610/661b727b/attachment-0001.htm>


More information about the CMake mailing list