Skip to content

Commit

Permalink
macos: try CMAKE_IGNORE_PREFIX_PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
vszakats committed Jul 8, 2024
1 parent 08d9a94 commit ef8ea61
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions _build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,7 @@ build_single_target() {
# NOTE: 10.8 (and older) trigger C++ issues with Xcode and CMake.
macminver='10.9'
_CMAKE_GLOBAL+=" -DCMAKE_OSX_DEPLOYMENT_TARGET=${macminver}"
# FIXME: This option might have been renamed to `-mmacos-version-min=`?
_CFLAGS_GLOBAL+=" -mmacosx-version-min=${macminver}"
_CXXFLAGS_GLOBAL+=" -mmacosx-version-min=${macminver}"
_OSVER="$(printf '%02d%02d' \
Expand Down Expand Up @@ -1185,8 +1186,10 @@ build_single_target() {
# Minimum SDK version supported by Xcode releases:
# https://developer.apple.com/support/xcode/

# Explicitly set the SDK root. This forces clang to drop /usr/local
# from the list of default header search paths.
# Do not pick up components from this prefix:
_CMAKE_GLOBAL+=" -DCMAKE_IGNORE_PREFIX_PATH=${brew_root}"

# Explicitly set the SDK root.
# We set it for all build tools for macOS to gain control over this.
_SYSROOT="$(xcrun -sdk macosx --show-sdk-path)" # E.g. /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk

Expand Down

0 comments on commit ef8ea61

Please sign in to comment.