Skip to content

build(xcframework): nest the CFFmpeg module map under Headers/CFFmpeg/ - #61

Merged
bilipp merged 1 commit into
mainfrom
fix/nest-cffmpeg-modulemap
Nov 2, 2026
Merged

bilipp merged 1 commit into
mainfrom
fix/nest-cffmpeg-modulemap

Conversation

@bilipp

@bilipp bilipp commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Summary

Lume is adding AetherEngine as a fifth engine. AetherEngine pulls in LibDovi, whose static Dovi.xcframework also puts module.modulemap at the root of Headers/. Xcode copies every static xcframework's Headers/ into one Products/<config>/include/, so the app build stops with "Multiple commands produce …/include/module.modulemap". LibDovi is third-party, so the fix goes here.

Change

build/scripts/make-xcframework.sh now stages CFFmpeg.h, CFFmpegShim.h and module.modulemap in Headers/CFFmpeg/. lume_ffmpeg/ stays at the Headers/ root, where CFFmpeg.h's <lume_ffmpeg/…> includes resolve against the Headers search path. No FFmpeg source, configure flag or patch changes.

Verification

  • I restructured the local BinaryDependencies/FFmpeg.xcframework to the new layout. swift build succeeds.
  • Lume (paired PR) builds on iOS sim, tvOS sim and macOS with AetherEngine linked, and LumeEngine's CFFmpeg module still resolves.
  • I did not run a fresh FFmpeg build through the full pipeline; only the staging step changed.

Release follow-up (not done here)

The published v0.3.0 FFmpeg.xcframework.zip still has the old layout, so CI and consumers on the URL path keep the old layout until a release attaches a rebuilt artifact and Package.swift's ffmpegArtifactURL and checksum move to it. Use the two-step flow in AGENTS.md. Lume CI and sideload builds hit the clash until then.

Related

Paired with bilipp/Lume's AetherEngine PR (feature/add-support-for-aetherengine-https).

Xcode copies every static xcframework's Headers/ into one
Products/<config>/include/, so a root module.modulemap collides with any
other package that ships one there. Lume hits this once it links
AetherEngine, whose LibDovi xcframework also puts module.modulemap at the
Headers root ("Multiple commands produce .../include/module.modulemap").

CFFmpeg.h, CFFmpegShim.h and module.modulemap now go to Headers/CFFmpeg/;
lume_ffmpeg/ stays at the root, where CFFmpeg.h's <lume_ffmpeg/...>
includes resolve against the Headers search path.

The published v0.3.0 artifact still has the old layout: a release has to
attach a rebuilt FFmpeg.xcframework.zip before Package.swift's URL and
checksum move to it.
@bilipp
bilipp merged commit 37ac589 into main Nov 2, 2026
5 checks passed
@bilipp
bilipp deleted the fix/nest-cffmpeg-modulemap branch November 2, 2026 20:08
naishyadav pushed a commit to naishyadav/LumeEngine that referenced this pull request Nov 9, 2026
The v0.5.0 release attaches an FFmpeg.xcframework.zip built with the
nested CFFmpeg module map (bilipp#61). Consumers without BinaryDependencies/
resolve this artifact; the v0.3.0 one still has the root module.modulemap
that collides with LibDovi's in a host that links both.
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.

1 participant