Skip to content

Conversation

@Kwansy98
Copy link
Contributor

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

@Kwansy98
Copy link
Contributor Author

@microsoft-github-policy-service agree

@BillyONeal
Copy link
Member

Thanks!

@BillyONeal BillyONeal enabled auto-merge (squash) August 15, 2025 19:30
@BillyONeal BillyONeal changed the title crashpad: export headers for MSBuild and CMake; bump port-version to 9 crashpad: export headers for MSBuild Aug 15, 2025
@BillyONeal BillyONeal merged commit 9580cbf into microsoft:master Aug 15, 2025
18 checks passed
@Kwansy98 Kwansy98 deleted the fix-crashpad-msvc-header branch August 16, 2025 02:45
@BillyONeal
Copy link
Member

@ras0219-msft points out that taking include/util, include/client, etc. are likely to create conflicts with other ports. If we see actual conflicts we'll be forced to revert this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[crashpad] build failure on MSVC

3 participants