[CMake] cpack help
David Blado
dblado at decarta.com
Mon Nov 13 18:14:21 EST 2006
Hi Dave,
I tracked this down as a potential issue w/ the way that cpack reads the
INSTALL feature of cmake. If I do INSTALL into a higher directory than
CMAKE_CURRENT_SOURCE_DIR, then cpack does not package anything. If my
DESTINATION is in CMAKE_CURRENT_SOURCE_DIR, then the tar package is
created.
Example:
INSTALL(TARGETS ${LIB_NAME}
RUNTIME DESTINATION bin CONFIGURATIONS release
LIBRARY DESTINATION lib CONFIGURATIONS release
ARCHIVE DESTINATION lib CONFIGURATIONS release
)
Packages correctly
INSTALL(TARGETS ${LIB_NAME}
RUNTIME DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/../../bin
CONFIGURATIONS release
LIBRARY DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/../../lib
CONFIGURATIONS release
ARCHIVE DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/../../lib
CONFIGURATIONS release
)
Does not package anything.
INSTALL(TARGETS ${LIB_NAME}
RUNTIME DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/bin CONFIGURATIONS
release
LIBRARY DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/lib CONFIGURATIONS
release
ARCHIVE DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/lib CONFIGURATIONS
release
)
Also does not package anything.
I couldn't find anything in the docs that state that using an absolute
path will break CPack.
Any ideas?
Cheers,
David
-----Original Message-----
From: David Cole [mailto:david.cole at kitware.com]
Sent: Friday, November 10, 2006 3:16 AM
To: David Blado
Subject: Re: Re: [CMake] cpack help
Sorry for the false response... At least I didn't copy the list.
I just re-read your new email and see that you *do* have INSTALL
commands.
Hmmm...... Sounds like something else must be wrong.
Any other clues? Is there a copy of your "make install" tree
underneath the _CPack_* directory in your binary tree...? Does it look
right?
Dave
On 11/10/06, David Cole <david.cole at kitware.com> wrote:
> Like Andy hinted at in his response to your Dart mailing list
> question, it's empty because you have no INSTALL commands in your
> CMakeLists.txt file. Do you expect something to be installed without
> any INSTALL commands?
>
> CPack packages up into an "end user runnable install package" the
> results of a "make install" command for your project. If your
> project's "make install" command results in an empty tree, then CPack
> is correctly creating an empty .tar.gz in this case...
>
> HTH,
> David Cole
>
> On 11/10/06, David Blado <dblado at decarta.com> wrote:
> >
> >
> >
> >
> > Hi All,
> >
> >
> >
> > I was hoping that someone here could help me out w/ cpack. I've
copied
> > sample CMakeLists cpack section with no success. Every time I issue
make
> > package the package comes out empty.
> >
> >
> >
> > I do have some INSTALL commands defined and they work perfectly fine
when I
> > do 'make install'
> >
> >
> >
> > I see the following:
> >
> >
> >
> > Run CPack packaging tool...
> >
> > CPack: Create package using TGZ
> >
> > CPack: Install projects
> >
> > CPack: - Run preinstall target for: test
> >
> > CPack: - Install project: test
> >
> > CPack: Compress package
> >
> > CPack: Finalize package
> >
> > CPack: Package
> > /home/dblado/dds4.1.3/Common2/TMClib/src/test-0.1.1-Linux.tar.gz
> > generated.
> >
> >
> >
> > But if I do tar ztvf on the file, it's empty.
> >
> >
> >
> > Anyone have any hints or tips? I've tried w/ a basic
'INCLUDE(CPack)' as
> > well as specifying the options @
> > http://www.cmake.org/Wiki/CMake:Packaging_With_CPack
> >
> >
> >
> > Any help would be greatly appreciated.
> >
> >
> >
> > Cheers,
> > David
> >
> >
> > _______________________________________________
> > CMake mailing list
> > CMake at cmake.org
> > http://www.cmake.org/mailman/listinfo/cmake
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20061113/5940a8f2/attachment-0001.htm
More information about the CMake
mailing list