crashpad: export headers for MSBuild (#46930)

This commit is contained in:
hambaga 2025-08-16 03:43:21 +08:00 committed by GitHub
parent 61ee033e37
commit 9580cbf7ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 32 additions and 3 deletions

View File

@ -11,7 +11,7 @@ find_dependency(ZLIB)
if(NOT TARGET crashpad::crashpad)
add_library(crashpad::crashpad INTERFACE IMPORTED)
target_include_directories(crashpad::crashpad INTERFACE "${_IMPORT_PREFIX}/include/crashpad")
target_include_directories(crashpad::crashpad INTERFACE "${_IMPORT_PREFIX}/include/crashpad" "${_IMPORT_PREFIX}/include")
set(_libs vcpkg_crashpad_client vcpkg_crashpad_client_common vcpkg_crashpad_util vcpkg_crashpad_base)
if(APPLE)

View File

@ -145,6 +145,19 @@ install_headers("${SOURCE_PATH}/third_party/mini_chromium/mini_chromium/build")
file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/gen/build/chromeos_buildflags.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/${PORT}/build")
file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/gen/build/chromeos_buildflags.h.flags" DESTINATION "${CURRENT_PACKAGES_DIR}/include/${PORT}/build")
# On Windows/MSVC, mirror headers into the root include directory so MSBuild integration
# (which adds only <installed>/include) can resolve un-namespaced includes like
# "client/..." and "base/...".
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
message(STATUS "Mirroring headers into include root for MSBuild consumption...")
file(COPY "${SOURCE_PATH}/client" DESTINATION "${CURRENT_PACKAGES_DIR}/include" FILES_MATCHING PATTERN "*.h")
file(COPY "${SOURCE_PATH}/util" DESTINATION "${CURRENT_PACKAGES_DIR}/include" FILES_MATCHING PATTERN "*.h")
file(COPY "${SOURCE_PATH}/third_party/mini_chromium/mini_chromium/base" DESTINATION "${CURRENT_PACKAGES_DIR}/include" FILES_MATCHING PATTERN "*.h")
file(COPY "${SOURCE_PATH}/third_party/mini_chromium/mini_chromium/build" DESTINATION "${CURRENT_PACKAGES_DIR}/include" FILES_MATCHING PATTERN "*.h")
file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/gen/build/chromeos_buildflags.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/build")
file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/gen/build/chromeos_buildflags.h.flags" DESTINATION "${CURRENT_PACKAGES_DIR}/include/build")
endif()
if(VCPKG_TARGET_IS_OSX)
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/obj/util/libmig_output.a" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
@ -169,11 +182,22 @@ file(REMOVE_RECURSE
"${PACKAGES_INCLUDE_DIR}/util/net/testdata"
"${PACKAGES_INCLUDE_DIR}/build/ios")
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/include/util/net/testdata"
"${CURRENT_PACKAGES_DIR}/include/build/ios")
endif()
configure_file("${CMAKE_CURRENT_LIST_DIR}/crashpadConfig.cmake.in"
"${CURRENT_PACKAGES_DIR}/share/${PORT}/crashpadConfig.cmake" @ONLY)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/${PORT}/build/config")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/${PORT}/util/mach/__pycache__")
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
# Remove empty directory created under the mirrored root include
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/build/config")
endif()
vcpkg_copy_pdbs()
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

View File

@ -1,7 +1,7 @@
{
"name": "crashpad",
"version-date": "2024-04-11",
"port-version": 8,
"port-version": 9,
"description": [
"Crashpad is a crash-reporting system.",
"Crashpad is a library for capturing, storing and transmitting postmortem crash reports from a client to an upstream collection server. Crashpad aims to make it possible for clients to capture process state at the time of crash with the best possible fidelity and coverage, with the minimum of fuss."

View File

@ -2134,7 +2134,7 @@
},
"crashpad": {
"baseline": "2024-04-11",
"port-version": 8
"port-version": 9
},
"crashrpt": {
"baseline": "1.4.3",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "3db57798ca8f3d8309c3564cc7a8a1ed8955bf63",
"version-date": "2024-04-11",
"port-version": 9
},
{
"git-tree": "a996b10d98428c6f61d1a8d75dd4b4d5509c37dd",
"version-date": "2024-04-11",