mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 13:51:33 -06:00
CPack/WiX: Allow multiple empty top-level components
Avoid generating empty / conflicting directory components for the installation root which is shared across components and (except for the degenerate case of an empty installer) will always be created implicitly.
This commit is contained in:
@@ -1015,6 +1015,10 @@ void cmCPackWIXGenerator::AddDirectoryAndFileDefinitions(
|
||||
|
||||
if (emptyDirectory) {
|
||||
createDirectory = true;
|
||||
|
||||
if (directoryId == "INSTALL_ROOT") {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (directoryInstalledFile) {
|
||||
|
||||
@@ -3,6 +3,8 @@ CPack: Install projects
|
||||
CPack: - Install project: CPackWiXGenerator \[Release\]
|
||||
CPack: - Install component: applications
|
||||
CPack: - Install component: applications2
|
||||
CPack: - Install component: empty1
|
||||
CPack: - Install component: empty2
|
||||
CPack: - Install component: extras
|
||||
CPack: - Install component: headers
|
||||
CPack: - Install component: libraries
|
||||
|
||||
@@ -3,6 +3,8 @@ CPack: Install projects
|
||||
CPack: - Install project: CPackWiXGenerator \[Release\]
|
||||
CPack: - Install component: applications
|
||||
CPack: - Install component: applications2
|
||||
CPack: - Install component: empty1
|
||||
CPack: - Install component: empty2
|
||||
CPack: - Install component: extras
|
||||
CPack: - Install component: headers
|
||||
CPack: - Install component: libraries
|
||||
|
||||
@@ -33,6 +33,9 @@ install(FILES mylib.h "file with spaces.h"
|
||||
DESTINATION include
|
||||
COMPONENT headers)
|
||||
|
||||
install(CODE "" COMPONENT "empty1")
|
||||
install(CODE "" COMPONENT "empty2")
|
||||
|
||||
set(CPACK_GENERATOR "WIX")
|
||||
|
||||
set(CPACK_PACKAGE_NAME "MyLib")
|
||||
|
||||
Reference in New Issue
Block a user