crashpad: export headers for MSBuild #46930
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #39749.
Changes
This PR addresses header resolution issues in the crashpad port for Windows/MSVC builds by implementing a dual header layout strategy:
Problem
The crashpad library uses unnamespaced includes like #include "client/..." and #include "base/..." in its headers. However, the current port only installs headers under include/crashpad/, causing MSBuild integration to fail since it only adds /include to the include path, not the namespaced subdirectory.
Solution
Dual header layout for Windows/MSVC: Mirror all necessary headers into the root include directory (include/) in addition to the existing namespaced location (include/crashpad/)
Updated CMake config: Modified crashpadConfig.cmake.in to include both header paths for proper resolution
Maintained backward compatibility: Existing CMake projects using the namespaced path continue to work
Files Modified
ports/crashpad/portfile.cmake: Added logic to copy headers to root include directory for Windows/MSVC builds
ports/crashpad/crashpadConfig.cmake.in: Updated to include both header paths
ports/crashpad/vcpkg.json: Bumped port-version to 9
Version database files updated accordingly
Testing
Tested with vcpkg install crashpad:x86-windows-static
Tested with vcpkg install crashpad:x64-windows-static
Verified MSBuild integration with vcpkg integrate install