MantisBT - CMake
View Issue Details
0015135CMakeCPackpublic2014-09-08 05:452015-04-06 09:07
Richard Ulrich 
Nils Gladitz 
normalfeaturealways
closedfixed 
CMake 3.0.1 
CMake 3.1 
0015135: Allow properties on installed directories
Since cmake 3 (I think) we can set properties on installed files.
This is great, but it would be even better, if we could also set these properties on installed directories.
INSTALL(DIRECTORY source/
    DESTINATION "/"
    COMPONENT app
    PATTERN "Database/*.zip" EXCLUDE
)
SET_PROPERTY(INSTALL "/"
        PROPERTY CPACK_WIX_ACL "Everyone=GenericAll"
)
Since the install properties are part of cmInstalledFile, it's not just a WiX issue. WiX in turn supports these properties on directories.
http://wixtoolset.org/documentation/manual/v3/xsd/wix/createfolder.html [^]

At the moment I sole it with a custom action, but it would be really great if I didn't have to do that.
No tags attached.
Issue History
2014-09-08 05:45Richard UlrichNew Issue
2014-09-08 05:47Nils GladitzAssigned To => Nils Gladitz
2014-09-08 05:47Nils GladitzStatusnew => assigned
2014-09-27 11:45Nils GladitzNote Added: 0036866
2014-09-29 10:15Nils GladitzNote Added: 0036871
2014-09-29 10:15Nils GladitzStatusassigned => resolved
2014-09-29 10:15Nils GladitzFixed in Version => CMake 3.1
2014-09-29 10:15Nils GladitzResolutionopen => fixed
2014-09-30 08:33Richard UlrichNote Added: 0036876
2014-09-30 08:33Richard UlrichStatusresolved => feedback
2014-09-30 08:33Richard UlrichResolutionfixed => reopened
2014-09-30 08:34Richard UlrichNote Edited: 0036876bug_revision_view_page.php?bugnote_id=36876#r1585
2014-09-30 08:34Richard UlrichNote Edited: 0036876bug_revision_view_page.php?bugnote_id=36876#r1586
2014-09-30 09:48Nils GladitzNote Added: 0036877
2014-10-03 09:18Nils GladitzNote Added: 0036894
2014-10-06 10:02Nils GladitzNote Added: 0036902
2014-10-06 10:02Nils GladitzStatusfeedback => resolved
2014-10-06 10:02Nils GladitzResolutionreopened => fixed
2015-04-06 09:07Robert MaynardNote Added: 0038416
2015-04-06 09:07Robert MaynardStatusresolved => closed

Notes
(0036866)
Nils Gladitz   
2014-09-27 11:45   
I merged "wix-directory-permissions" topic to next for testing:
http://www.cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d48c781fc2e637fd9605775f44f4360bec6a59d9 [^]

It extends the CPACK_WIX_ACL property to cover directories as well.
(0036871)
Nils Gladitz   
2014-09-29 10:15   
The topic has been merged into "master".
(0036876)
Richard Ulrich   
2014-09-30 08:33   
(edited on: 2014-09-30 08:34)
Thanks Nils for implementing this so quick.

Just a small note from my testing:
The example in "Steps To Reproduce" did not work, but if I set the property on the subfolders, it works. e.g. :

INSTALL(DIRECTORY source/
    DESTINATION "/"
    COMPONENT app
    PATTERN "Database/*.zip" EXCLUDE
)
SET_PROPERTY(INSTALL "bin"
        PROPERTY CPACK_WIX_ACL "Everyone=GenericAll"
)
SET_PROPERTY(INSTALL "client"
        PROPERTY CPACK_WIX_ACL "Everyone=GenericAll"
)
...

No need for changing the implementation, it's all I need.

Ps: I had to reopen the issue to be able to add this comment. You can close it again.

(0036877)
Nils Gladitz   
2014-09-30 09:48   
I must admin I am surprised that works at all.

The WIX generator disallows use of absolute destinations (though the logic that is supposed to enforce this is not generator specific).

This seems to get enforced for e.g. "/foo" but not "/".

The relative path for the root install destination should be "." though internally CMake seems to tell me it is "".
(0036894)
Nils Gladitz   
2014-10-03 09:18   
Since I got no feedback on the relative path issue in kwsys and cmake is being prepped for the 3.1 release I merged "wix-fix-root-dir-prop" for testing which works around the issue in the generator itself.

With it properties applied to "." rather than "" apply to the root directory of the installation.
(0036902)
Nils Gladitz   
2014-10-06 10:02   
"wix-fix-root-dir-prop" has been merged to master: http://www.cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fb009f00;hp=0e0cb710d03006920bef9d8746e0966a6e48e8fb [^]
(0038416)
Robert Maynard   
2015-04-06 09:07   
Closing resolved issues that have not been updated in more than 4 months.