You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add --namespaced-targets to gyp-to-cmake
* Use namespaced targets in node-addon-examples
* Support building multiple addons
* Limit spawn concurrency
* Emit prebuilds per target, next to their sources
A project declaring multiple addons wrote every prebuild into a single
output directory, named after the CMake target. Both the location and the
name are now derived per target from the CMake File API:
- The output directory defaults to {targetSourceDir}/build/{configuration},
where the new {targetSourceDir} placeholder expands to the target's own
source directory. A single-addon project reports "." and so resolves to
the same path as before.
- The prebuild is named after the artifact on disk (the target's
OUTPUT_NAME) rather than the target name, so a target renamed to avoid a
clash within the project still produces the name the JS require expects.
Together this keeps a prebuild where the Babel plugin and auto-linking
resolve it from, and reduces --namespaced-targets to an internal concern.
Also fixes, in the same area:
- gyp-to-cmake emitted OUTPUT_NAME regardless of --namespaced-targets, due
to an always-truthy condition, and never emitted it for Apple framework
targets, which CMake names after it.
- The Apple build ran a full "cmake --build" once per shared library,
concurrently against one build tree, and called "xcodebuild -list" (a
synchronous spawn) once per library per triplet.
- xcodebuild invocations now run in sequence per build directory, as
concurrent invocations against a single Xcode project are not reliable.
- postBuild looked for "<target name>.framework" while createAppleFramework
names it after the artifact, so the two diverged under namespacing.
- --concurrency accepted any value, and did not implement the documented
fallback to 1 under --verbose. Max listeners is now derived from it.
- verify-prebuilds globbed a directory the prebuilds had moved out of, so
it passed by finding nothing. It now covers tests/ too and requires a
non-zero count.
- The root example project globbed recursively, which both missed examples
copied in after configure and would add a nested project twice. It is
now generated from the same script pipeline.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KfKQDvEkxNtkSE4aaF9yG8
---------
Co-authored-by: Claude <noreply@anthropic.com>
"Specify the output directory to store the final build artifacts",
75
-
).default("{build}/{configuration}");
78
+
"Specify the output directory to store the final build artifacts. Supports the {targetSourceDir} placeholder, which expands to the source directory of the target being emitted",
0 commit comments