Notes |
|
(0021600)
|
Clinton Stimpson
|
2010-08-02 19:44
|
|
Let me clarify.
This is basically asking that CPACK_COMPONENTS_ALL work for all cpack generators, and not just NSIS and PackageMaker.
This is to allow control of component packaging with the cpack config, while not having to write more complicated cmake code like this:
if(devel_install)
install(... COMPONENT Runtime
... COMPONENT Development)
else()
install(... COMPONENT Runtime)
endif() |
|
|
(0021635)
|
Eric NOULARD
|
2010-08-04 10:22
|
|
Have a look at latest 10736 patchset.
Now for every CPack Archive Generators, the default behavior
is to build 1 archive file per component group (found in the CPACK_COMPONENTS_ALL list)
If you want 1 archive file per component then specify
CPACK_COMPONENT_IGNORE_COMPONENT_GROUP=1
If you want all-in-one archive then specify
CPACK_MONOLITHIC_INSTALL.
Does all those combination suits your needs? |
|
|
(0021642)
|
Clinton Stimpson
|
2010-08-04 12:43
|
|
I like that it is respecting components I've chosen to package. That lets me create different packages for different customers.
But with the CPACK_MONOLITHIC_INSTALL option, its creating a .tar.gz package with
a directory structure divided up by components. I don't want that.
I want a
/bin
/lib
/share
etc...
not
/Runtime/bin
/Development/lib
/Runtime/share
etc... |
|
|
(0021643)
|
Eric NOULARD
|
2010-08-04 12:49
|
|
Clint,
What is your platform?
On my Linux box if I do
mkdir Build
cd Build
cmake -DCPACK_MONOLITHIC_INSTALL=1 <path>/to/Source
make
cpack -G TGZ
I end up with no "component name" inside ?
Would you retry from a fresh build tree? |
|
|
(0021646)
|
Clinton Stimpson
|
2010-08-04 13:12
|
|
I just edited the CPackConfig.cmake of an existing project and ran the new cpack on it.
From a new test project
====
file(WRITE file.txt.in "hi")
configure_file(file.txt.in ${CMAKE_CURRENT_BINARY_DIR}/file-runtime.txt)
configure_file(file.txt.in ${CMAKE_CURRENT_BINARY_DIR}/file-devel.txt)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/file-runtime.txt
DESTINATION bin COMPONENT Runtime)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/file-devel.txt
DESTINATION lib COMPONENT Development)
SET(CPACK_COMPONENTS_ALL Runtime Unspecified)
set(CPACK_MONOLITHIC_INSTALL 1)
include(CPack)
====
I get this warning when doing an include(CPack)
CPack warning: both CPACK_COMPONENTS_ALL and CPACK_MONOLITHIC_INSTALL have been set.
When I look at the CPackConfig.cmake, CPACK_COMPONENTS_ALL is missing, so I've lost control over which components to package.
If I edit the CPackConfig.cmake and put CPACK_COMPONENTS_ALL in it, then I get the behavior I was telling you before. |
|
|
(0021647)
|
Eric NOULARD
|
2010-08-04 13:45
|
|
Ok right,
I understand now.
CPACK_MONOLITHIC_INSTALL is exclusive with
CPACK_COMPONENTS_ALL.
CPACK_MONOLITHIC_INSTALL basically ignore components
whereas CPACK_COMPONENTS_ALL describe the components
you want to install.
What you want is to have a **single** package containing
all components listed in CPACK_COMPONENTS_ALL.
The feature you want is more like having
CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE :-)
This options would only makes sense for
"natively multiple files" CPack generator
like Archive Generator or RPM, DEB etc...
may be for the next patch :-)
The current implementation (of the Archive Generator)
does not enable that behavior.
But off course ... it could be implemented. |
|
|
(0021870)
|
Eric NOULARD
|
2010-08-21 08:27
|
|
|
|
(0022036)
|
Eric NOULARD
|
2010-08-31 16:37
|
|
commit 65fa0f02351e1564d60b266594b425094dce1959
The following merge to master should fix the problem:
Merge: f95074b a986daf
Author: Brad King <brad.king@kitware.com>
Date: Tue Aug 31 14:24:32 2010 -0400
Merge topic 'CPackArchiveGenerator-ComponentSupport'
a986daf CPack fix broken compilation for CygwinSource generator
873e99a CPackArchiveGenerator improve usability and robustness
654683a CPackArchiveGenerator add component supports
36a550a CPackArchiveGenerator use cmArchiveWrite wrapper |
|