On macOS, this PR ensures that the Boost package is located at its real path rather than via the symlink in the default prefix.
A backport to 29.x is required for #32804, as this change prevents contamination of include directories by broad locations such as /usr/local/include
or /opt/homebrew/include
, which take precedence over Qt’s -iframework
flags.
Below is the relevant change in the configuration logs on my macOS 15.5 x64
:
- master branch @ ead44687483e9c936ba970de890c01d5e7ad3485:
0% cmake -B build
1<snip>
2-- Found Boost: /usr/local/include (found suitable version "1.88.0", minimum required is "1.73.0")
3<snip>
- this PR:
0% cmake -B build
1<snip>
2-- Found Boost: /usr/local/opt/boost/include (found suitable version "1.88.0", minimum required is "1.73.0")
3<snip>
This PR is forward-compatible with the changes proposed in #32667.