Rearchitect vcpkg port for official submission#1466
Open
bmehta001 wants to merge 18 commits into
Open
Conversation
Add a clean vcpkg-oriented CMake and overlay-port path so the SDK can be consumed through vcpkg across the supported platform set. This keeps vendored dependency builds available by default while enabling vcpkg-provided sqlite, zlib, nlohmann-json, and curl when the vcpkg toolchain is active. Files changed: CMake install/config support, overlay port metadata, vcpkg consumer tests, examples/docs, Obj-C/Swift wrapper source selection, and vcpkg test workflow. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Point the overlay mstelemetry port at the clean vcpkg source snapshot in this replacement PR and update the archive SHA512 used by vcpkg_from_github. Files changed: tools/ports/mstelemetry/portfile.cmake Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use Android-specific PAL implementations when the top-level CMake path targets Android, and remove the missing bundled zlib simd_stub source from the Android legacy dependency path. Also make the vcpkg consumer test build as C++11 to match the SDK consumer compatibility posture. Files changed: lib/CMakeLists.txt, tests/vcpkg/CMakeLists.txt Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update the overlay port REF and SHA512 to the source snapshot that includes the Android CMake source fixes and C++11 vcpkg consumer test. Files changed: tools/ports/mstelemetry/portfile.cmake Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
6900a6a to
79b1807
Compare
GitHub source archives used by the public vcpkg port do not include the lib/modules submodule. Avoid installing public headers whose exported factories/functions are implemented only by absent optional modules, so core vcpkg consumers do not get linkable-looking APIs without implementations. Files changed: lib/include/CMakeLists.txt Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update the overlay port REF and SHA512 to the source snapshot that excludes module-only public headers from the core vcpkg install. Files changed: tools/ports/mstelemetry/portfile.cmake Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Build the Android vcpkg package with the native Curl HTTP client instead of the Java-backed Android HTTP client, so native consumers using find_package(MSTelemetry) can initialize the SDK without the Java bridge creating the Android HTTP singleton. Strengthen the vcpkg consumer test by calling LogManager::Initialize and FlushAndTeardown. Files changed: CMakeLists.txt, lib/CMakeLists.txt, tools/ports/mstelemetry/vcpkg.json, tests/vcpkg/main.cpp Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update the overlay port REF and SHA512 to the source snapshot that uses Curl for Android vcpkg consumers. Files changed: tools/ports/mstelemetry/portfile.cmake Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The SDK only needs HTTP/HTTPS. Disable curl default features and enable only ssl so Android vcpkg builds do not pull in unused non-HTTP protocol objects that fail to link on the Android NDK. Files changed: tools/ports/mstelemetry/vcpkg.json Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update the overlay port REF and SHA512 to the source snapshot that disables unused curl non-HTTP protocols. Files changed: tools/ports/mstelemetry/portfile.cmake Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Document and use Android API 28 for the vcpkg Android consumer test, matching vcpkg's Android triplet default. Keep curl default features disabled and request OpenSSL explicitly for the native Android vcpkg HTTP path. Files changed: tools/ports/mstelemetry/vcpkg.json, tests/vcpkg/test-vcpkg-android.sh, tests/vcpkg/README.md, docs/building-with-vcpkg.md Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update the overlay port REF and SHA512 to the source snapshot that aligns Android vcpkg validation with API 28 and requests OpenSSL explicitly for curl. Files changed: tools/ports/mstelemetry/portfile.cmake Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Export the vcpkg-resolved dependency targets through MSTelemetry::mat so static-library consumers receive sqlite, zlib, nlohmann-json, and curl link requirements. Also fix the template header install exclusion and update the package config Curl comment for Android vcpkg builds. Files changed: lib/CMakeLists.txt, lib/include/CMakeLists.txt, cmake/MSTelemetryConfig.cmake.in Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update the overlay port REF and SHA512 to the source snapshot that exports vcpkg dependency targets to downstream static-library consumers. Files changed: tools/ports/mstelemetry/portfile.cmake Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use API 23 overlay triplets for Android vcpkg validation so dependencies match the repo's Android minSdk instead of requiring API 28 consumers. Remove the unused bundled vcpkg submodule because tests and CI use an external VCPKG_ROOT. Keep Apple sample and legacy tests aligned with the dependency model: core vcpkg builds use Apple HTTP without Obj-C/Swift wrappers, and Android legacy tests reuse bundled zlib. Files changed: - .github/workflows/test-vcpkg.yml - .gitmodules - docs/building-with-vcpkg.md - examples/swift/SampleXcodeApp/SwiftWrapperApp.xcodeproj/project.pbxproj - lib/CMakeLists.txt - tests/functests/CMakeLists.txt - tests/unittests/CMakeLists.txt - tests/vcpkg/README.md - tests/vcpkg/test-vcpkg-android.sh - tests/vcpkg/triplets/*.cmake - tools/ports/mstelemetry/vcpkg.json - tools/vcpkg Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Point the overlay port at the source snapshot that removes the bundled vcpkg submodule, aligns Android validation with API 23, and keeps Apple/core dependency behavior consistent. Files changed: - tools/ports/mstelemetry/portfile.cmake Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Seed MATSDK_INSTALL_DIR from the cache/environment and fall back to /usr/local, removing the intermediate _MATSDK_DEFAULT_INSTALL_DIR temporary while preserving -DMATSDK_INSTALL_DIR override precedence. Files changed: - examples/cmake/MSTelemetrySample.cmake Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Point the overlay port REF/SHA512 at the source snapshot that simplifies the MATSDK_INSTALL_DIR default in the sample helper. Files changed: - tools/ports/mstelemetry/portfile.cmake Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This replaces #1414 with a clean history based directly on current
main. The earlier PR had accumulated too much unrelated branch history, so this PR carries only the vcpkg/CMake port layer.Goals
Scope
MATSDK_USE_VCPKG_DEPS) and install/export support.tools/ports/mstelemetryoverlay port files.tests/vcpkgconsumer project and platform scripts.tools/vcpkgsubmodule; tests and CI bootstrap vcpkg from an externalVCPKG_ROOT.Core SDK only (no private modules)
MSTelemetry::mattarget only.lib/modulessubmodule are not available via the vcpkg port: official vcpkg source archives pin an immutable commit and do not fetch git submodules, and that submodule is an internal-only repository.CompliantByDefaultFilterApi.hpp,IAFDClient.hpp,ICdsFactory.hpp,IECSClient.hpp) are excluded from the installed headers.BUILD_OBJC_WRAPPER/BUILD_SWIFT_WRAPPER=OFF); the core SDK — including the AppleHttpClient_AppleHTTP stack — is still built on macOS/iOS.docs/building-with-vcpkg.mddocuments this scope and how to build modules from a full--recurse-submodulessource checkout.HTTP client per platform
curl[openssl]), declared only forlinux | androidinvcpkg.json.Android API level
minSdkis 23, so the Android consumer test defaults to API 23 using custom overlay triplets intests/vcpkg/triplets(VCPKG_CMAKE_SYSTEM_VERSION 23) and requires Ninja so the host IDE generator does not select a different NDK.Not in scope
Validation performed
git diff --check.x64-windows-static, C++11 consumer project,vcpkg_testincludingLogManager::Initialize()/FlushAndTeardown()).x64-linux).arm64-android-api23overlay triplet) and API 28 (built-inarm64-android) using native libcurl HTTP.tools/ports/mstelemetry/portfile.cmake.--use_telemetryagainst this branch's SDK source and ran a telemetry harness on an emulator; telemetry events were emitted successfully.Follow-up after this merges
microsoft/vcpkgusing this repo's merged commit/tag as the source (and runvcpkg format-manifest+vcpkg x-add-versionin the vcpkg repo).cpp_client_telemetry_modulescan be fetched from a suitable source.