Merge topic 'wix-empty-components'

6e3f6e925d CPack/WiX: Allow multiple empty top-level components

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11172
This commit is contained in:
Brad King
2025-09-12 15:28:02 +00:00
committed by Kitware Robot
4 changed files with 11 additions and 0 deletions

View File

@@ -1040,6 +1040,10 @@ void cmCPackWIXGenerator::AddDirectoryAndFileDefinitions(
if (emptyDirectory) {
createDirectory = true;
if (directoryId == "INSTALL_ROOT") {
return;
}
}
if (directoryInstalledFile) {

View File

@@ -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

View File

@@ -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

View File

@@ -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")