-
-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
63a0ba9
commit 36649b7
Showing
6 changed files
with
50 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
|
||
set -xeu | ||
|
||
if [[ "${VCPKG_VERSION:-}" == "" ]]; then | ||
echo "Must set VCPKG_VERSION environment var" | ||
exit 1 | ||
fi | ||
|
||
export VCPKG_ROOT="$HOME/build/vcpkg" | ||
if [[ -e "$VCPKG_ROOT" && ! -e "$VCPKG_ROOT/.git" ]]; then | ||
rm -rf "$VCPKG_ROOT" | ||
fi | ||
if [ ! -e "$VCPKG_ROOT" ]; then | ||
git clone https://github.com/Microsoft/vcpkg.git "$VCPKG_ROOT" | ||
fi | ||
pushd "$VCPKG_ROOT" | ||
git fetch --all --prune --tags | ||
git status | ||
git checkout . | ||
git checkout "$VCPKG_VERSION" | ||
./bootstrap-vcpkg.sh -disableMetrics | ||
#./vcpkg integrate install | ||
echo "set(VCPKG_BUILD_TYPE release)" >> triplets/arm64-osx.cmake | ||
echo "set(VCPKG_BUILD_TYPE release)" >> triplets/x64-osx.cmake | ||
export VCPKG_DEFAULT_TRIPLET=arm64-osx | ||
( | ||
set +e | ||
cmake --version | ||
# 2024-04-15, cmake 3.29.1 doesn't work so well with vcpkg, remove this hack when cmake is 3.29.2+ | ||
# https://github.com/microsoft/vcpkg/issues/37968 | ||
# mv -vf /usr/local/bin/cmake /usr/local/bin/cmake.bad | ||
if ! ./vcpkg install --clean-after-build --recurse "opencv[contrib,nonfree]"; then | ||
for log in "$VCPKG_ROOT/buildtrees"/**/*out.log; do | ||
echo "=== $log" | ||
cat "$log" | ||
done | ||
exit 1 | ||
fi | ||
# mv -vf /usr/local/bin/cmake.bad /usr/local/bin/cmake | ||
) | ||
# remove build artifacts to save CI cache space | ||
rm -rf "$VCPKG_ROOT/downloads" "$VCPKG_ROOT/buildtrees" "$VCPKG_ROOT/packages" | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters