Skip to content

Commit 97b30d2

Browse files
committed
Prepend vcpkg to search vcpkg before <prefix>/lib/cmake
Since we are installing dependencies on vcpkg, if `lib/cmake` is searched first, then cmake will look into that directory and use the wrong paths.
1 parent 646f347 commit 97b30d2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ci/scripts/cpp_test.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,9 @@ if [ "${ARROW_USE_MESON:-OFF}" = "OFF" ] && \
144144
CMAKE_PREFIX_PATH+="/lib/cmake/"
145145
;;
146146
esac
147+
# Search vcpkg before <prefix>/lib/cmake.
147148
if [ -n "${VCPKG_ROOT}" ] && [ -n "${VCPKG_DEFAULT_TRIPLET}" ]; then
148-
CMAKE_PREFIX_PATH+=";${VCPKG_ROOT}/installed/${VCPKG_DEFAULT_TRIPLET}"
149+
CMAKE_PREFIX_PATH="${VCPKG_ROOT}/installed/${VCPKG_DEFAULT_TRIPLET};${CMAKE_PREFIX_PATH}"
149150
fi
150151
cmake \
151152
-S "${source_dir}/examples/minimal_build" \

0 commit comments

Comments
 (0)