Keep wx-config framework pairs together in CMake link libraries - #47
Draft
johnrichardrinehart wants to merge 1 commit into
Draft
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
wx-config --libs basecan emit-framework IOKit -framework Carbonon macOS. Splitting this output into CMake list entries separates the framework names from their flags. When these entries reachtarget_link_libraries, CMake can turn the bare names into-lIOKitand-lCarbon, producing an invalid link command.Change
Rejoin each
-framework;NAMEpair immediately afterseparate_arguments, preserving-framework NAMEas 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.