Repository navigation
Restore macOS support: add x64 and arm64 runtime NuGet packages - #1947
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds macOS x64 and arm64 build, test, and packaging support; introduces matching vcpkg triplets and runtime NuGet projects; and updates workflow validation, docs, and local build ignores. ChangesmacOS build and packaging
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
nuget/OpenCvSharp4.runtime.osx.x64.csproj (1)
8-8: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚖️ Poor tradeoffBreaking rename without a compatibility shim.
OpenCvSharp4.runtime.osx.10.15-x64is being renamed toOpenCvSharp4.runtime.osx.x64. Pernuget/README.runtime.md, the analogouslinux-armrename was kept as a compatibility shim that pulls in the renamed package. Consumers still referencing the oldosx.10.15-x64id will silently stop receiving updates. Consider publishing a meta-package shim or documenting the migration prominently.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@nuget/OpenCvSharp4.runtime.osx.x64.csproj` at line 8, The package ID rename from OpenCvSharp4.runtime.osx.10.15-x64 to OpenCvSharp4.runtime.osx.x64 needs a compatibility shim so existing consumers don’t break. Update the runtime package metadata in the osx x64 csproj and add a meta-package wrapper, similar to the linux-arm compatibility pattern referenced in nuget/README.runtime.md, so the old package ID continues to resolve to the new one and receive updates..github/workflows/macos.yml (1)
408-419: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueAlways-beta package version.
BETA: "-beta"is hardcoded, so every package produced frommainis suffixed-betaand there is no path to a stable release from this workflow. If a stable release is ever intended from this pipeline, this should be parameterized (e.g. viaworkflow_dispatchinput).🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/macos.yml around lines 408 - 419, The macOS packaging step hardcodes the beta suffix, so the workflow can only produce `-beta` versions and cannot generate a stable release. Update the version handling in this workflow so the suffix is parameterized instead of fixed, using the existing packaging/`dotnet pack` steps for `OpenCvSharp4.runtime.osx.x64` and `OpenCvSharp4.runtime.osx.arm64`, and wire it to a configurable input or variable that can switch between beta and stable behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/macos.yml:
- Line 23: The macOS workflow is pinned to a retired runner label, causing the
job to fail before it starts. Update the `runs-on` setting in the `macos.yml`
workflow from the old `macos-13` label to `macos-15-intel` so the Intel dylib
build uses a supported runner. Locate the change in the workflow job that builds
the x86_64 dylib and keep the runner choice aligned with GitHub’s current Intel
macOS support.
---
Nitpick comments:
In @.github/workflows/macos.yml:
- Around line 408-419: The macOS packaging step hardcodes the beta suffix, so
the workflow can only produce `-beta` versions and cannot generate a stable
release. Update the version handling in this workflow so the suffix is
parameterized instead of fixed, using the existing packaging/`dotnet pack` steps
for `OpenCvSharp4.runtime.osx.x64` and `OpenCvSharp4.runtime.osx.arm64`, and
wire it to a configurable input or variable that can switch between beta and
stable behavior.
In `@nuget/OpenCvSharp4.runtime.osx.x64.csproj`:
- Line 8: The package ID rename from OpenCvSharp4.runtime.osx.10.15-x64 to
OpenCvSharp4.runtime.osx.x64 needs a compatibility shim so existing consumers
don’t break. Update the runtime package metadata in the osx x64 csproj and add a
meta-package wrapper, similar to the linux-arm compatibility pattern referenced
in nuget/README.runtime.md, so the old package ID continues to resolve to the
new one and receive updates.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: d650895a-100a-4a72-836d-4331d9e20e78
📒 Files selected for processing (12)
.github/workflows/macos.yml.github/workflows/publish_nuget.yml.gitignoreREADME.mdcmake/triplets/arm64-osx-static.cmakecmake/triplets/x64-osx-static.cmakedocs/docfx/articles/intro.mdnuget/OpenCvSharp4.runtime.osx.arm64.csprojnuget/OpenCvSharp4.runtime.osx.x64.csprojnuget/README.runtime.mdsrc/OpenCvSharpExtern/CMakeLists.txtsrc/OpenCvSharpExtern/include_opencv.h
236d32f to
60b3a4b
Compare
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
README.md (1)
211-211: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winAdd macOS to the native bindings availability statement.
Line 211 states "Currently, native bindings for Windows x64/ARM64, Linux x64/ARM64, and WebAssembly are available." Since this PR restores macOS support with x64 and arm64 packages, macOS should be listed here to keep the documentation accurate.
-Native binding (OpenCvSharpExtern.dll / libOpenCvSharpExtern.so) is required for OpenCvSharp to work. To use OpenCvSharp, you should add both `OpenCvSharp4` and `OpenCvSharp4.runtime.*` packages to your project. Currently, native bindings for Windows x64/ARM64, Linux x64/ARM64, and WebAssembly are available. +Native binding (OpenCvSharpExtern.dll / libOpenCvSharpExtern.so / libOpenCvSharpExtern.dylib) is required for OpenCvSharp to work. To use OpenCvSharp, you should add both `OpenCvSharp4` and `OpenCvSharp4.runtime.*` packages to your project. Currently, native bindings for Windows x64/ARM64, Linux x64/ARM64, macOS x64/ARM64, and WebAssembly are available.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@README.md` at line 211, Add macOS to the native bindings availability statement in the README text describing OpenCvSharp native bindings. Update the sentence that currently lists Windows x64/ARM64, Linux x64/ARM64, and WebAssembly so it also mentions macOS x64/arm64, matching the restored support and keeping the documentation accurate.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/macos.yml:
- Around line 364-370: The macOS test workflow is writing the TRX file to the
default TestResults location, so the later artifact upload cannot find it.
Update the dotnet test invocation in the macos workflow to explicitly set a
results directory and make the upload-artifact path match that location, using
the existing test-results.trx output from the OpenCvSharp.Tests run.
In `@README.md`:
- Line 3: Update the badge alt text in the README so the platform name uses the
correct casing, changing every “Github” label in that badge line to “GitHub”
including the macOS badge and the existing badges beside it. Locate the markdown
badge definitions in README.md and keep the links unchanged while only
correcting the visible alt text/title wording.
- Around line 95-111: Add the missing macOS installation guidance to
nuget/README.managed.md so it matches the root README and other platform
sections. Update the Quick Start area with a macOS subsection for Intel and
Apple Silicon that shows adding OpenCvSharp4 plus the matching runtime package
(OpenCvSharp4.runtime.osx.x64 or OpenCvSharp4.runtime.osx.arm64), and include
the same Requirements note listing the excluded modules (FFmpeg-based video I/O,
Tesseract OCR, HDF, Freetype). Follow the existing Linux/Ubuntu formatting and
keep the section aligned with the README structure.
---
Outside diff comments:
In `@README.md`:
- Line 211: Add macOS to the native bindings availability statement in the
README text describing OpenCvSharp native bindings. Update the sentence that
currently lists Windows x64/ARM64, Linux x64/ARM64, and WebAssembly so it also
mentions macOS x64/arm64, matching the restored support and keeping the
documentation accurate.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: e12f166c-f5a8-40f9-9052-11ca1ca08c86
📒 Files selected for processing (12)
.github/workflows/macos.yml.github/workflows/publish_nuget.yml.gitignoreREADME.mdcmake/triplets/arm64-osx-static.cmakecmake/triplets/x64-osx-static.cmakedocs/docfx/articles/intro.mdnuget/OpenCvSharp4.runtime.osx.arm64.csprojnuget/OpenCvSharp4.runtime.osx.x64.csprojnuget/README.runtime.mdsrc/OpenCvSharpExtern/CMakeLists.txtsrc/OpenCvSharpExtern/include_opencv.h
✅ Files skipped from review due to trivial changes (2)
- .gitignore
- nuget/README.runtime.md
🚧 Files skipped from review as they are similar to previous changes (8)
- nuget/OpenCvSharp4.runtime.osx.arm64.csproj
- cmake/triplets/arm64-osx-static.cmake
- cmake/triplets/x64-osx-static.cmake
- src/OpenCvSharpExtern/include_opencv.h
- src/OpenCvSharpExtern/CMakeLists.txt
- docs/docfx/articles/intro.md
- .github/workflows/publish_nuget.yml
- nuget/OpenCvSharp4.runtime.osx.x64.csproj
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
README.md (1)
193-212: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick winAdd the new macOS runtime packages to the native bindings table.
The native bindings table is missing the two new macOS packages introduced by this PR. Also update the summary sentence at line 211 to include macOS.
|**[OpenCvSharp4.runtime.wasm](https://www.nuget.org/packages/OpenCvSharp4.runtime.wasm/)**| Native bindings for WebAssembly | +|**[OpenCvSharp4.runtime.osx.x64](https://www.nuget.org/packages/OpenCvSharp4.runtime.osx.x64/)**| Native bindings for macOS Intel (x64). FFmpeg, Tesseract, HDF, and Freetype are not included. | +|**[OpenCvSharp4.runtime.osx.arm64](https://www.nuget.org/packages/OpenCvSharp4.runtime.osx.arm64/)**| Native bindings for macOS Apple Silicon (arm64). FFmpeg, Tesseract, HDF, and Freetype are not included. | > **Note:** Windows x86 (32-bit) support has been dropped as of the OpenCV 4.13.0 release series. > The `OpenCvSharp4.runtime.win` and `OpenCvSharp4.runtime.win.slim` packages now ship **x64-only** native binaries. > Users requiring x86 Windows support should stay on the last OpenCV 4.12.x-based packages. -Native binding (OpenCvSharpExtern.dll / libOpenCvSharpExtern.so) is required for OpenCvSharp to work. To use OpenCvSharp, you should add both `OpenCvSharp4` and `OpenCvSharp4.runtime.*` packages to your project. Currently, native bindings for Windows x64/ARM64, Linux x64/ARM64, and WebAssembly are available. +Native binding (OpenCvSharpExtern.dll / libOpenCvSharpExtern.so / libOpenCvSharpExtern.dylib) is required for OpenCvSharp to work. To use OpenCvSharp, you should add both `OpenCvSharp4` and `OpenCvSharp4.runtime.*` packages to your project. Currently, native bindings for Windows x64/ARM64, Linux x64/ARM64, macOS x64/arm64, and WebAssembly are available.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@README.md` around lines 193 - 212, The native bindings section is missing the new macOS runtime entries, so update the table in README to include the two macOS packages alongside the existing Windows, Linux, and WASM rows. Also revise the summary sentence near the end of that section to mention macOS support in addition to the current platforms.Source: Coding guidelines
♻️ Duplicate comments (1)
README.md (1)
3-3: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winFix "Github" to "GitHub" in all badge alt texts.
All five workflow badge alt texts still use "Github" instead of the correct "GitHub" spelling. This was flagged in a previous review and remains unfixed.
- [](https://github.com/shimat/opencvsharp/actions) [](https://github.com/shimat/opencvsharp/actions) [](https://github.com/shimat/opencvsharp/actions) [](https://github.com/shimat/opencvsharp/actions) [](https://github.com/shimat/opencvsharp/actions) + [](https://github.com/shimat/opencvsharp/actions) [](https://github.com/shimat/opencvsharp/actions) [](https://github.com/shimat/opencvsharp/actions) [](https://github.com/shimat/opencvsharp/actions) [](https://github.com/shimat/opencvsharp/actions)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@README.md` at line 3, The badge alt texts in the README still use the incorrect “Github” spelling; update all workflow badge labels to “GitHub” for consistency. Locate the markdown badge line in README and change each alt text string, including the Windows, Docker Test, manylinux, Wasm, and macOS badges, so they all use the same corrected capitalization.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@README.md`:
- Around line 95-111: The macOS installation guidance added in README.md is
missing from the NuGet docs, so update both nuget/README.managed.md and
nuget/README.runtime.md to stay in sync. Add the same step-by-step macOS setup
instructions shown in the root README, including the OpenCvSharp4 package
install and the x64/arm64 runtime package examples, and make sure the existing
macOS package notes in the README.runtime.md section are expanded rather than
duplicated inconsistently.
---
Outside diff comments:
In `@README.md`:
- Around line 193-212: The native bindings section is missing the new macOS
runtime entries, so update the table in README to include the two macOS packages
alongside the existing Windows, Linux, and WASM rows. Also revise the summary
sentence near the end of that section to mention macOS support in addition to
the current platforms.
---
Duplicate comments:
In `@README.md`:
- Line 3: The badge alt texts in the README still use the incorrect “Github”
spelling; update all workflow badge labels to “GitHub” for consistency. Locate
the markdown badge line in README and change each alt text string, including the
Windows, Docker Test, manylinux, Wasm, and macOS badges, so they all use the
same corrected capitalization.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 2edb7f69-c57b-4d5a-995b-97d0b5dbdab7
📒 Files selected for processing (12)
.github/workflows/macos.yml.github/workflows/publish_nuget.yml.gitignoreREADME.mdcmake/triplets/arm64-osx-static.cmakecmake/triplets/x64-osx-static.cmakedocs/docfx/articles/intro.mdnuget/OpenCvSharp4.runtime.osx.arm64.csprojnuget/OpenCvSharp4.runtime.osx.x64.csprojnuget/README.runtime.mdsrc/OpenCvSharpExtern/CMakeLists.txtsrc/OpenCvSharpExtern/include_opencv.h
✅ Files skipped from review due to trivial changes (3)
- nuget/README.runtime.md
- .gitignore
- docs/docfx/articles/intro.md
🚧 Files skipped from review as they are similar to previous changes (8)
- nuget/OpenCvSharp4.runtime.osx.arm64.csproj
- cmake/triplets/x64-osx-static.cmake
- nuget/OpenCvSharp4.runtime.osx.x64.csproj
- cmake/triplets/arm64-osx-static.cmake
- src/OpenCvSharpExtern/CMakeLists.txt
- .github/workflows/publish_nuget.yml
- src/OpenCvSharpExtern/include_opencv.h
- .github/workflows/macos.yml
140672e to
b54c516
Compare
|
You can see the workflow running in my fork, at least for the tasks it is able to do under the permissions it has: https://github.com/mathieucarbou/shimat-opencvsharp/actions/workflows/macos.yml |
e9ff4c1 to
8296428
Compare
|
Converted PR to draft - need to fix this remaining error: https://github.com/mathieucarbou/shimat-opencvsharp/actions/runs/28267030324/job/83756059344#step:11:25 I already got a green build previously by excluding ffmpeg and some others from the linkage, test passed, but I am now trying to keep the features on par with the linux platforms. |
Add a complete macOS CI pipeline that builds libOpenCvSharpExtern.dylib
for both Intel (x64) and Apple Silicon (arm64) and publishes them as
NuGet packages. macOS builds are now fully on par with Linux and Windows
— all OpenCV modules are enabled including FFmpeg, Tesseract, HDF5, and
Freetype, all statically linked via vcpkg.
New packages:
- OpenCvSharp4.runtime.osx.x64 (macOS x64, Intel)
- OpenCvSharp4.runtime.osx.arm64 (macOS arm64, Apple Silicon)
The old OpenCvSharp4.runtime.osx.10.15-x64 package is renamed to
OpenCvSharp4.runtime.osx.x64 (dropping the macOS version from the
package name, consistent with other platforms).
Files added:
- .github/workflows/macos.yml
CI workflow with build_x64 (macos-26-intel), build_arm64 (macos-26),
test, and nuget jobs. Builds OpenCV from source via vcpkg + CMake/Ninja,
then builds OpenCvSharpExtern, runs tests on arm64, and packs both
runtime NuGet packages. Includes vcpkg and OpenCV caching with keys
that track submodule SHAs and workflow file changes.
- cmake/triplets/x64-osx-static.cmake
- cmake/triplets/arm64-osx-static.cmake
vcpkg triplets for static macOS builds (release-only).
- nuget/OpenCvSharp4.runtime.osx.arm64.csproj
NuGet packaging for arm64 dylib → runtimes/osx-arm64/native.
Files modified:
- src/OpenCvSharpExtern/CMakeLists.txt
• Add /opt/homebrew/lib to APPLE link_directories (Apple Silicon).
• Pre-resolve Eigen3 (find_package) before OpenCV config on APPLE
— OpenCV's static cmake config references Eigen3::Eigen but does
not call find_package for it.
• Remove 'NOT APPLE' guard on Tesseract linking — Tesseract is now
linked on macOS too, same as Windows and Linux.
- src/OpenCvSharpExtern/include_opencv.h
• Remove NO_TEXT guard around #include <opencv2/text.hpp>.
- .github/workflows/publish_nuget.yml
• Uncomment and update macOS artifact download (macos.yml).
• Add osx.x64 and osx.arm64 package validation checks.
- nuget/OpenCvSharp4.runtime.osx.x64.csproj (renamed from osx.10.15-x64)
• Update PackageId, target frameworks to netstandard2.0/2.1/net8.0.
- nuget/README.runtime.md, README.md, docs/docfx/articles/intro.md,
nuget/README.managed.md
• Document macOS x64 + arm64 packages and installation.
- .gitignore
• Add opencv_artifacts_arm64/ and src/build-arm64/.
macOS build details:
- FFmpeg, Tesseract, HDF5, Freetype, and Harfbuzz are installed as
static libraries via vcpkg classic mode and merged into the manifest
install directory so the vcpkg toolchain finds them.
- CMAKE_OSX_DEPLOYMENT_TARGET=11.0 for both x64 and arm64 (macOS Big Sur,
November 2020 — minimum version that supports Apple Silicon).
- Homebrew protobuf/abseil are uninstalled before building OpenCV to
prevent their C++17 headers from conflicting with OpenCV's bundled
C++11 protobuf.
- Transitive static library dependencies are explicitly listed in
CMAKE_SHARED_LINKER_FLAGS: -llzma -lzstd -lsharpyuv -lwebp -lwebpmux
-lwebpdemux -lwebpdecoder -ljpeg -lpng16 -ltiff -ltesseract
-lleptonica -lgif -lfreetype -lharfbuzz
Verified locally: arm64 dylib builds and links successfully on
Apple Silicon (M-series) with only system framework dependencies.
|
@shimat : I've put this PR as ready to review now. The macOS workflow and tests are passing as you can see in my fork, and also in this PR in previous builds: https://github.com/mathieucarbou/shimat-opencvsharp/actions Also I have just rebased / fixup the commits into one. |
Add macOS x64/arm64 CI and runtime packages (port of #1947 to 5.x)
…support (#48) * Use the right OpenCvSharp4.runtime.osx names See issue: #46 See PR: shimat/opencvsharp#1947 * Run CI on each pull request and branch (cherry picked from commit fdbfb24) * Fix ZWO support
Port the macOS support added on main (4.x) in shimat#1947 to the 5.x branch, adapted for OpenCV 5 and the OpenCvSharp5 package naming: - .github/workflows/macos.yml: build_x64 (macos-26-intel), build_arm64 (macos-26), test (arm64), and nuget jobs. Builds OpenCV 5.0.0 from source via vcpkg + CMake/Ninja, then OpenCvSharpExtern, and packs both runtime NuGet packages. OPENCV_VERSION=5.0.0, triggers on push to 5.x. - cmake/triplets/{x64,arm64}-osx-static.cmake: static macOS vcpkg triplets. - vcpkg.json: add ffmpeg/hdf5/freetype/harfbuzz/eigen3 for osx. - src/OpenCvSharpExtern/CMakeLists.txt: * add /opt/homebrew/lib to APPLE link_directories (Apple Silicon) * pre-resolve Eigen3 and HDF5 before OpenCV config on APPLE * link Tesseract on macOS too (drop the NOT APPLE guard) - nuget: rename OpenCvSharp5.runtime.osx.10.15-x64 -> OpenCvSharp5.runtime.osx.x64 and add OpenCvSharp5.runtime.osx.arm64; target netstandard2.0/2.1/net8.0. - .github/workflows/publish_nuget.yml: enable macOS artifact download and add osx.x64 / osx.arm64 package validation. - docs: update package list and supported platforms for macOS arm64. Note: include_opencv.h needs no change on 5.x (text.hpp is already included unconditionally). The macOS-5 build specifics (find_package deps, linker flags) may need iteration against the macOS runners. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Summary
Add a complete macOS CI pipeline that builds
libOpenCvSharpExtern.dylibfor both Intel (x64) and Apple Silicon (arm64) and publishes them as NuGet packages.macOS builds are now fully on par with Linux and Windows — all OpenCV modules are enabled including FFmpeg, Tesseract, HDF5, and Freetype, all statically linked via vcpkg.
New Packages
OpenCvSharp4.runtime.osx.x64OpenCvSharp4.runtime.osx.arm64The old
OpenCvSharp4.runtime.osx.10.15-x64package is renamed toOpenCvSharp4.runtime.osx.x64(dropping the macOS version from the package name, consistent with other platforms).Installation
Files Added
.github/workflows/macos.yml— CI workflow withbuild_x64(macos-26-intel),build_arm64(macos-26),test, andnugetjobs. Builds OpenCV from source via vcpkg + CMake/Ninja, then builds OpenCvSharpExtern, runs tests on arm64, and packs both runtime NuGet packages. Includes vcpkg and OpenCV caching with keys that track submodule SHAs and workflow file changes.cmake/triplets/x64-osx-static.cmakeandcmake/triplets/arm64-osx-static.cmake— vcpkg triplets for static macOS builds (release-only).nuget/OpenCvSharp4.runtime.osx.arm64.csproj— NuGet packaging for arm64 dylib →runtimes/osx-arm64/native.Files Modified
src/OpenCvSharpExtern/CMakeLists.txt/opt/homebrew/libto APPLE link_directories (Apple Silicon).find_package) before OpenCV config on APPLE — OpenCV's static cmake config referencesEigen3::Eigenbut does not callfind_packagefor it.NOT APPLEguard on Tesseract linking — Tesseract is now linked on macOS too, same as Windows and Linux.src/OpenCvSharpExtern/include_opencv.h— RemoveNO_TEXTguard around#include <opencv2/text.hpp>..github/workflows/publish_nuget.yml— Uncomment and update macOS artifact download; addosx.x64andosx.arm64package validation checks.nuget/OpenCvSharp4.runtime.osx.x64.csproj(renamed fromosx.10.15-x64) — Update PackageId, target frameworks tonetstandard2.0/2.1/net8.0.nuget/README.runtime.md,README.md,docs/docfx/articles/intro.md,nuget/README.managed.md— Document macOS x64 + arm64 packages and installation..gitignore— Addopencv_artifacts_arm64/andsrc/build-arm64/.macOS Build Details
CMAKE_OSX_DEPLOYMENT_TARGET=11.0for both x64 and arm64 (macOS Big Sur, November 2020 — minimum version that supports Apple Silicon).CMAKE_SHARED_LINKER_FLAGS:-llzma -lzstd -lsharpyuv -lwebp -lwebpmux -lwebpdemux -lwebpdecoder -ljpeg -lpng16 -ltiff -ltesseract -lleptonica -lgif -lfreetype -lharfbuzzVerification
Verified locally: arm64 dylib builds and links successfully on Apple Silicon (M-series) with only system framework dependencies. CI builds and tests pass for both x64 and arm64.