Skip to content

Commit 767c072

Browse files
committed
Re-do lines deleted by mistake (introduced in commit 8d8e03c) to build cmake from source on 64 bit archs.
1 parent a8da589 commit 767c072

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

buildscripts/make_dependencies.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,16 @@ if [ -f ${INSTALL_DIR}/bin/protoc ]; then
3030
echo "Not building protobuf. Already built"
3131
# TODO(ejona): swap to `brew install --devel protobuf` once it is up-to-date
3232
else
33+
if [[ ! -d "cmake-${CMAKE_VERSION}" ]]; then
34+
curl -Ls "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}.tar.gz" | tar xz
35+
fi
36+
# the same source dir is used for 32 and 64 bit builds, so we need to clean stale data first
37+
rm -rf "$DOWNLOAD_DIR/cmake-${CMAKE_VERSION}/bin"
38+
cd "$DOWNLOAD_DIR/cmake-${CMAKE_VERSION}"
39+
./bootstrap
40+
make
41+
make install
42+
ln -s /usr/local/bin/cmake /usr/bin/cmake
3343
cd "$DOWNLOAD_DIR"
3444
if [[ ! -d "protobuf-${PROTOBUF_VERSION}" ]]; then
3545
curl -Ls "https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/protobuf-${PROTOBUF_VERSION}.tar.gz" | tar xz

0 commit comments

Comments
 (0)