diff --git a/ports/crashpad/crashpadConfig.cmake.in b/ports/crashpad/crashpadConfig.cmake.in index 5af2d26d81..e524884336 100644 --- a/ports/crashpad/crashpadConfig.cmake.in +++ b/ports/crashpad/crashpadConfig.cmake.in @@ -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) diff --git a/ports/crashpad/portfile.cmake b/ports/crashpad/portfile.cmake index 6985a8b6cf..c209bd4b8f 100644 --- a/ports/crashpad/portfile.cmake +++ b/ports/crashpad/portfile.cmake @@ -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 /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") diff --git a/ports/crashpad/vcpkg.json b/ports/crashpad/vcpkg.json index fee2ddb704..99618928f4 100644 --- a/ports/crashpad/vcpkg.json +++ b/ports/crashpad/vcpkg.json @@ -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." diff --git a/versions/baseline.json b/versions/baseline.json index 7f7d961c79..1defd35c87 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2134,7 +2134,7 @@ }, "crashpad": { "baseline": "2024-04-11", - "port-version": 8 + "port-version": 9 }, "crashrpt": { "baseline": "1.4.3", diff --git a/versions/c-/crashpad.json b/versions/c-/crashpad.json index e4bf60ceeb..31517292f4 100644 --- a/versions/c-/crashpad.json +++ b/versions/c-/crashpad.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "3db57798ca8f3d8309c3564cc7a8a1ed8955bf63", + "version-date": "2024-04-11", + "port-version": 9 + }, { "git-tree": "a996b10d98428c6f61d1a8d75dd4b4d5509c37dd", "version-date": "2024-04-11",