Skip to content

Keep wx-config framework pairs together in CMake link libraries - #47

Draft
johnrichardrinehart wants to merge 1 commit into
musescore:mainfrom
johnrichardrinehart:fix/wxwidgets-macos-framework-link-items
Draft

Keep wx-config framework pairs together in CMake link libraries#47
johnrichardrinehart wants to merge 1 commit into
musescore:mainfrom
johnrichardrinehart:fix/wxwidgets-macos-framework-link-items

Conversation

@johnrichardrinehart

@johnrichardrinehart johnrichardrinehart commented Sep 7, 2026

Copy link
Copy Markdown

Problem

wx-config --libs base can emit -framework IOKit -framework Carbon on macOS. Splitting this output into CMake list entries separates the framework names from their flags. When these entries reach target_link_libraries, CMake can turn the bare names into -lIOKit and -lCarbon, producing an invalid link command.

Change

Rejoin each -framework;NAME pair immediately after separate_arguments, preserving -framework NAME as one CMake link item. Both system and local wxWidgets resolution use this path; ordinary library flags are unchanged.

Verification and status

Draft: native macOS build verification is outstanding. The downstream integrator reports reproducing the actual recipe's malformed framework flags and obtaining the correct flags with this change. No build, test, lint, or formatter commands were run as part of this upstream submission. Downstream application and validation will be performed separately. Current main and open PRs were inspected; no equivalent framework-pair fix was found (including the wxWidgets file list for #46).

AI disclosure

This patch and PR text were prepared and submitted by an AI coding assistant at the repository owner's explicit request. Human review and any required contributor agreements remain outstanding.

Validation update

Subsequent validation: a before/after CMake generation smoke using the actual recipe and a wx-config fixture reproduced malformed -lIOKit/-lCarbon arguments, then generated correct -framework IOKit and -framework Carbon pairs. The fetched patch applies to the Audacity 4.0.0 source archive, and its full Linux package build passed. Native Darwin linking is now being reviewed.

Rejoin -framework and its following framework name after splitting the
wx-config output. Otherwise CMake treats bare framework names as library
names and emits flags such as -framework -lIOKit -lCarbon.

This applies to both system and local wxWidgets resolution.
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