Skip to content

cmake: Allow recasting a CMake dependency into an Apple framework#12181

Merged
jpakkane merged 1 commit intomesonbuild:masterfrom
amyspark:cmake-recast-frameworks
Feb 24, 2024
Merged

cmake: Allow recasting a CMake dependency into an Apple framework#12181
jpakkane merged 1 commit intomesonbuild:masterfrom
amyspark:cmake-recast-frameworks

Conversation

@amyspark
Copy link
Contributor

This PR allows the combination of macOS + GCC to still find frameworks. This can already be done through CMake's own support of framework lookup (which is undocumented at the moment).

However, there's a catch: CMake's fileapi sometimes exposes these through raw framework directories, which are recast at generation time into -F /path/to/framework/folder -framework name. This needs to be done manually, so I duplicated two bits of code in ExtraFrameworkDependency to achieve this.

Fixes #12160

@tristan957 tristan957 added this to the 1.3.0 milestone Aug 31, 2023
@tristan957
Copy link
Member

@kiwixz another PR for review if you are interested. The test failures look relevant.

@amyspark amyspark force-pushed the cmake-recast-frameworks branch 2 times, most recently from fc1454c to 2a72a8e Compare September 6, 2023 13:36
@amyspark amyspark requested a review from tristan957 September 6, 2023 13:36
@tristan957
Copy link
Member

Any chance there could be a test added to this which failed before this commit and passed after?

@xclaesse xclaesse modified the milestones: 1.3.0, 1.4.0 Oct 17, 2023
@amyspark amyspark force-pushed the cmake-recast-frameworks branch from 2a72a8e to 361b219 Compare January 16, 2024 16:23
@amyspark
Copy link
Contributor Author

@tristan I've added the repro from the issue here. Let me know if there's anything else to address.

@amyspark amyspark force-pushed the cmake-recast-frameworks branch from 361b219 to efa6e03 Compare February 24, 2024 20:54
@amyspark amyspark requested a review from jpakkane February 24, 2024 20:54
@jpakkane jpakkane merged commit 05f4e0d into mesonbuild:master Feb 24, 2024
@amyspark amyspark deleted the cmake-recast-frameworks branch February 25, 2024 13:45
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.

Broken linking on GCC + macOS if a framework is detected through CMake

4 participants