Skip to content

Commit 562a254

Browse files
committed
expand comment to explain user overrides
1 parent c71ed97 commit 562a254

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

utils/build-script-impl

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -584,10 +584,15 @@ function set_build_options_for_host() {
584584

585585
cmake_os_sysroot="$(xcrun --sdk ${platform} --show-sdk-path)"
586586

587-
# Give the SDK sysroot higher priority in calls to CMake `find_*`
588-
# functions, over paths that may come from `pkg-config`. This fixes
589-
# compile failures caused when `pkg-config` returns CommandLineTools
590-
# paths instead of Xcode paths.
587+
# Customize the CMake `find_*` search paths to search the SDK
588+
# sysroot before searching `pkg-config` paths. This prevents compile
589+
# failures caused when `pkg-config` returns CommandLineTools paths
590+
# instead of Xcode paths.
591+
#
592+
# These search paths can be user customized either by setting the
593+
# `CMAKE_PREFIX_PATH` environment variable, or by setting the same
594+
# CMake variable via the command line (`-DCMAKE_PREFIX_PATH`).
595+
# See https://cmake.org/cmake/help/latest/command/find_path.html
591596
export CMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}:${cmake_os_sysroot}/usr"
592597

593598
cmark_cmake_options=(

0 commit comments

Comments
 (0)