Skip to content

feat: Add CMakeBuilder.runStandalone for standalone CMake builds#36

Merged
rainyl merged 3 commits into
rainyl:mainfrom
mosuem:interface
Jul 17, 2026
Merged

feat: Add CMakeBuilder.runStandalone for standalone CMake builds#36
rainyl merged 3 commits into
rainyl:mainfrom
mosuem:interface

Conversation

@mosuem

@mosuem mosuem commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Overview

In the spirit of dart-lang/native#2004: Adds support for running CMakeBuilder standalone without requiring BuildInput or BuildOutputBuilder (e.g. for standalone build scripts or CI artifact generation scripts outside of hook/build.dart).

The first commit is running dart format, to separate that from the real changes in the other commits.

To be used for example in google/webcrypto.dart#325

Changes

  • CMakeBuilder.runStandalone: Added runStandalone accepting target configuration (outputDirectory, targetOS, targetArchitecture, android, iOS, macOS, userDefines, etc.) explicitly.
  • RunCMakeBuilder Decoupling: Refactored RunCMakeBuilder to accept individual target parameters instead of requiring a CodeConfig or non-null HookInput.
  • Environment & Package Config Utilities: Updated getUserEnvConfig and _parsePackageConfig to work in standalone mode using pattern matching and fallback to Isolate.packageConfig / .dart_tool/package_config.json.
  • Tests: Added cmake_builder_standalone_test.dart verifying standalone CMake build execution.

@rainyl

rainyl commented Jul 17, 2026

Copy link
Copy Markdown
Owner

@mosuem Thanks for the PR. Will review and merge it.

@rainyl
rainyl merged commit cf03731 into rainyl:main Jul 17, 2026
10 checks passed
@rainyl

rainyl commented Jul 17, 2026

Copy link
Copy Markdown
Owner

LGTM, I have merged it and will publish a new version 0.2.7, thanks for your contribution 😄 👍

@mosuem

mosuem commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

That was super fast, thanks so much! Also thanks for the great contributions to the ecosystem in general, I love your opencv for Dart work.

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.

2 participants