Skip to content

Conversation

@vepadulano
Copy link
Member

The previous logic to link against MacOS frameworks was just passing the string "-framework ". This bypasses the CMake find_library logic, in particular it disregards CMake variables such as CMAKE_OSX_SYSROOT, CMAKE_FIND_ROOT_PATH, CMAKE_FRAMEWORK_PATH etc. Switch to the standard find_library function to find the framework and then use the result as a library target, thus benefiting from this logic described in the CMake documentation:

If the library found is a framework, then <VAR> will be set to the full path to the framework <fullPath>/A.framework. When a full path to a framework is used as a library, CMake will use a -framework A, and a -F<fullPath> to link the framework to the target.

See https://cmake.org/cmake/help/latest/command/find_library.html

@vepadulano vepadulano self-assigned this Jan 23, 2026
@vepadulano vepadulano requested a review from bellenot as a code owner January 23, 2026 16:23
@vepadulano vepadulano added in:Build System clean build Ask CI to do non-incremental build on PR labels Jan 23, 2026
@vepadulano vepadulano force-pushed the macos-framework-link branch 2 times, most recently from adc14b9 to 77a0e4b Compare January 23, 2026 20:58
The previous logic to link against MacOS frameworks was just passing the string "-framework <NAME>". This bypasses the CMake find_library logic, in particular it disregards CMake variables such as CMAKE_OSX_SYSROOT, CMAKE_FIND_ROOT_PATH, CMAKE_FRAMEWORK_PATH etc. Switch to the standard find_library function to find the framework and then use the result as a library target, thus benefiting from this logic described in the CMake documentation:

```
If the library found is a framework, then <VAR> will be set to the full path to the framework <fullPath>/A.framework. When a full path to a framework is used as a library, CMake will use a -framework A, and a -F<fullPath> to link the framework to the target.
```
@vepadulano vepadulano force-pushed the macos-framework-link branch from 77a0e4b to 4ed2402 Compare January 23, 2026 21:47
Copy link
Member

@pcanal pcanal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks.

@github-actions
Copy link

Test Results

    22 files      22 suites   3d 7h 31m 37s ⏱️
 3 767 tests  3 766 ✅ 0 💤 1 ❌
74 944 runs  74 943 ✅ 0 💤 1 ❌

For more details on these failures, see this check.

Results for commit 4ed2402.

@vepadulano vepadulano merged commit bc468a6 into root-project:master Jan 24, 2026
28 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clean build Ask CI to do non-incremental build on PR in:Build System

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants