Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update src/CMakeLists.txt: Fix CPack Error when building with latest vcpkg #10098

Merged
merged 3 commits into from
Dec 22, 2023

Conversation

ultralapse
Copy link
Contributor

@ultralapse ultralapse commented Dec 11, 2023

Added set(CPACK_COMPONENTS_ALL "") to prevent cmake from adding the line set(CPACK_COMPONENTS_ALL "Runtime;Unspecified") which will cause the error (CPack Error: Some XML patch fragments did not have matching IDs: 'CM_CP_KeePassXC.exe' ) later on. As mentioned by the linked issue, this is an error that happens when building with the latest version of vcpkg.

Specifically we want to prevent the circled elements from being appended to the generated WiX XML files.

image

Fixes #10097

Type of change

  • ✅ Bug fix (non-breaking change that fixes an issue)

Added set(CPACK_COMPONENTS_ALL "") to prevent cmake from causing an XML fragments issue later on in CPack.
@ultralapse ultralapse changed the title Update CMakeLists.txt Update src/CMakeLists.txt: Fix CPack Error: Some XML patch fragments did not have matching IDs: 'CM_CP_KeePassXC.exe Dec 11, 2023
@ultralapse ultralapse changed the title Update src/CMakeLists.txt: Fix CPack Error: Some XML patch fragments did not have matching IDs: 'CM_CP_KeePassXC.exe Update src/CMakeLists.txt: Fix CPack Error when building with latest vcpkg Dec 11, 2023
@phoerious
Copy link
Member

phoerious commented Dec 12, 2023

Thanks! Could you please test your change also with this branch: #10088

Don't forget to set -DCMAKE_TOOLCHAIN_FILE on your cmake command.

@ultralapse
Copy link
Contributor Author

@phoerious While testing this on the branch #10088, I noticed that even when specifying my vcpkg.cmake, it would still have to rebuild all dependencies in the build directory, rather than grabbing the already built ones from my vcpkg directory. Was this an intentional feature?

@phoerious
Copy link
Member

phoerious commented Dec 12, 2023

Ideally, the already-installed binaries should just be copied over if the version dependencies match.

EDIT: See here: https://learn.microsoft.com/en-gb/vcpkg/users/binarycaching

@ultralapse
Copy link
Contributor Author

ultralapse commented Dec 12, 2023

@phoerious I just tested my change on the branch #10088 and building was successful 😊

@droidmonkey droidmonkey merged commit 681a0f5 into keepassxreboot:develop Dec 22, 2023
9 of 11 checks passed
@ultralapse ultralapse deleted the patch-1 branch December 24, 2023 00:07
pull bot pushed a commit to tigerwill90/keepassxc that referenced this pull request Dec 24, 2023
Added set(CPACK_COMPONENTS_ALL "") to prevent cmake from causing an XML fragments issue later on in CPack.
@droidmonkey droidmonkey added the pr: backported Pull request backported to previous release label Jan 27, 2024
droidmonkey pushed a commit that referenced this pull request Jan 27, 2024
Added set(CPACK_COMPONENTS_ALL "") to prevent cmake from causing an XML fragments issue later on in CPack.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build system pr: backported Pull request backported to previous release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CPack Error: Some XML patch fragments did not have matching IDs: 'CM_CP_KeePassXC.exe'
3 participants