From b573c6e6203272e6738020c83cf0d09078f08eb6 Mon Sep 17 00:00:00 2001 From: Mujahid-Dandoti Date: Sun, 14 Nov 2021 21:59:44 +0530 Subject: [PATCH] Updated protobuf version for s390x Signed-off-by: Mujahid-Dandoti --- cmake/modules/protobuf.cmake | 38 +++++++++++------------------------- 1 file changed, 11 insertions(+), 27 deletions(-) diff --git a/cmake/modules/protobuf.cmake b/cmake/modules/protobuf.cmake index 623cd814d8..1ed9f954ba 100644 --- a/cmake/modules/protobuf.cmake +++ b/cmake/modules/protobuf.cmake @@ -24,33 +24,17 @@ else() if(NOT TARGET protobuf) message(STATUS "Using bundled protobuf in '${PROTOBUF_SRC}'") - if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "s390x") - ExternalProject_Add(protobuf - PREFIX "${PROJECT_BINARY_DIR}/protobuf-prefix" - DEPENDS openssl zlib - URL "http://download.sysdig.com/dependencies/protobuf-cpp-3.5.0.tar.gz" - URL_MD5 "e4ba8284a407712168593e79e6555eb2" - PATCH_COMMAND wget http://download.sysdig.com/dependencies/protobuf-3.5.0-s390x.patch && patch -p1 -i protobuf-3.5.0-s390x.patch - # TODO what if using system zlib? - CONFIGURE_COMMAND /usr/bin/env CPPFLAGS=-I${ZLIB_INCLUDE} LDFLAGS=-L${ZLIB_SRC} ./configure --with-zlib --disable-shared --enable-static --prefix=${PROTOBUF_INSTALL_DIR} - COMMAND aclocal && automake - BUILD_COMMAND ${CMD_MAKE} - BUILD_IN_SOURCE 1 - BUILD_BYPRODUCTS ${PROTOC} ${PROTOBUF_INCLUDE} ${PROTOBUF_LIB} - INSTALL_COMMAND make install) - else() - ExternalProject_Add(protobuf - PREFIX "${PROJECT_BINARY_DIR}/protobuf-prefix" - DEPENDS openssl zlib - URL "https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-cpp-3.17.3.tar.gz" - URL_HASH "SHA256=51cec99f108b83422b7af1170afd7aeb2dd77d2bcbb7b6bad1f92509e9ccf8cb" - # TODO what if using system zlib? - CONFIGURE_COMMAND /usr/bin/env CPPFLAGS=-I${ZLIB_INCLUDE} LDFLAGS=-L${ZLIB_SRC} ./configure --with-zlib --disable-shared --enable-static --prefix=${PROTOBUF_INSTALL_DIR} - BUILD_COMMAND ${CMD_MAKE} - BUILD_IN_SOURCE 1 - BUILD_BYPRODUCTS ${PROTOC} ${PROTOBUF_INCLUDE} ${PROTOBUF_LIB} - INSTALL_COMMAND make install) - endif() + ExternalProject_Add(protobuf + PREFIX "${PROJECT_BINARY_DIR}/protobuf-prefix" + DEPENDS openssl zlib + URL "https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-cpp-3.17.3.tar.gz" + URL_HASH "SHA256=51cec99f108b83422b7af1170afd7aeb2dd77d2bcbb7b6bad1f92509e9ccf8cb" + # TODO what if using system zlib? + CONFIGURE_COMMAND /usr/bin/env CPPFLAGS=-I${ZLIB_INCLUDE} LDFLAGS=-L${ZLIB_SRC} ./configure --with-zlib --disable-shared --enable-static --prefix=${PROTOBUF_INSTALL_DIR} + BUILD_COMMAND ${CMD_MAKE} + BUILD_IN_SOURCE 1 + BUILD_BYPRODUCTS ${PROTOC} ${PROTOBUF_INCLUDE} ${PROTOBUF_LIB} + INSTALL_COMMAND make install) endif() endif()