Notes |
|
(0012328)
|
Dieter Rosch
|
2008-06-12 10:34
|
|
I have a similar requirement.
In our system we can drop a full release, or a "patch" (partial) release. For example, if we have 3 executables, EXE1, EXE2 and EXE3, we will drop a full release comprising EXE1, EXE2 and EXE3. If only EXE3 changes, we will do a patch release containing only EXE3.
Currently CMake seems to require the INSTALL() command in the same directory as the target being installed. If this constraint was removed, one could create a file called ReleasePatchXXX.cmake, where XXX could be your version number for example. Eg, ReleasePatch_FULL.cmake could look like this:
install(TARGETS EXE1 RUNTIME DESTINATION bin)
install(TARGETS EXE2 RUNTIME DESTINATION bin)
install(TARGETS EXE3 RUNTIME DESTINATION bin)
for the full release.
Or ReleasePatch_PATCH.cmake could look like this:
install(TARGETS EXE3 RUNTIME DESTINATION bin)
This way a developer has full-control over which targets, files etc. are included in a specific package. |
|
|
(0012370)
|
David Cole
|
2008-06-17 13:38
|
|
See resolution and notes of duplicate issue 0006847 - does that solution work for this issue...? If that solution is not satisfactory, feel free to re-open this issue and attach a note explaining what additional features you would like to see over and above the CPack component/group approach. |
|
|
(0012391)
|
Yuri
|
2008-06-18 04:25
|
|
It's a good patch and I suppose to adopt it to my needs, but my original problem is slightly different. As I wrote to mailing list, I have a big project with about 100 targets (I know, KDE is bigger, but we have much common :)). Most of them are libraries and plugins (plugin is a library + some manifest).
I have a requirement to make different packages (core libraries + separate devel package, basic server daemon, several sets of plugins for it, etc.), where the same library may be in multiple libraries. The most obvious solution is to assign each library, binary or plugin a separate component. This approach is similar to one used in WiX, where "component is the atomic unit of things to be installed". Next, goes "feature" term, which comprises some set of components to be installed.
Doug partly introduced this term, but only for packaging, after everything is installed.
So, I'm missing some kind of "feature" or "package" in CMake. I can even try to implement this, but I need help to elaborate conception.
|
|
|
(0012392)
|
Dieter Rosch
|
2008-06-18 05:44
|
|
My requirement is also slightly different, in that I require the ability on UNIX (ie rpm, deb, stgz, or whatever) as well, and I do not require the ability to let the user select certain components. At package build time I want to specify the libs and exe's to include in the release (in a central file or location). They should all be included and then all installed when the package is deployed. |
|
|
(0012394)
|
Yuri
|
2008-06-18 07:35
|
|
Dieter, I'm also concerned about Linux too. The WiX/MSI was given as example of system which has 2-level components division.
Theoretically, this could be achieved in CMake now:
in EXE1 subdir:
install(TARGETS EXE1 RUNTIME DESTINATION bin COMPONENT FULL)
in EXE2 subdir:
install(TARGETS EXE2 RUNTIME DESTINATION bin COMPONENT FULL)
in EXE3 subdir:
install(TARGETS EXE3 RUNTIME DESTINATION bin COMPONENT FULL)
install(TARGETS EXE3 RUNTIME DESTINATION bin COMPONENT Patch)
(That is specify install command twice)
Note, that I didn't check that it works, but I hope it does :).
And next create 2 configuration files for CPack one for FULL component and second for Patch component.
The drawback of this approach: for each packaging type you should duplicate install command for each artifact to be installed. |
|
|
(0012395)
|
Dieter Rosch
|
2008-06-18 08:24
(edited on: 2008-06-18 15:20) |
|
If the double INSTALL does work (I'll check ...) that will allow some interesting ideas. If one can have the INSTALL() command in a different CMakeLists.txt than the one in which the executable/library is added, it would allow one to specify which components make up a patch, by using single CMake file.
UPDATE:
Yes! The double install() call does indeed work! As I said above, if the constraint is removed that the install() call needs to be in the same CMakeLists.txt as the target, this solution would be ideal for me.
|
|
|
(0012408)
|
Dieter Rosch
|
2008-06-18 15:22
|
|
Sorry, not sure if editing my response above triggers an email to everyone watching this thread:
Yes! The double install() call does indeed work! As I said above, if the constraint is removed that the install() call needs to be in the same CMakeLists.txt as the target, this solution would be ideal for me.
PS. Thanks for the tip! |
|
|
(0012849)
|
Yuri
|
2008-07-29 03:34
|
|
While looking into implementation of components support, I've found an interesting thing: With component-based installation, you can install arbitrary set of components. For example:
set(CPACK_INSTALL_CMAKE_PROJECTS ".;MyProject;ALL;/")
set(CPACK_COMPONENTS_ALL Devel Schema)
So... components are designed for cpack, and regular "make install" doesn't support components at all. Therefore it is OK that code which handles complex installation/packaging solutions lives in cpack (I mean groups of components). My problem can be solved in terms of issue 0006847 and you can close this bug. |
|
|
(0012855)
|
David Cole
|
2008-07-29 10:18
|
|
Closing (again) in response to the notes added since the last time this issue was closed. See also notes in "duplicate" issue 0006847. |
|