Skip to content

Commit

Permalink
Updated protobuf version for s390x
Browse files Browse the repository at this point in the history
Signed-off-by: Mujahid-Dandoti <[email protected]>
  • Loading branch information
dandotimujahid authored and poiana committed Dec 15, 2021
1 parent 3cc178e commit b573c6e
Showing 1 changed file with 11 additions and 27 deletions.
38 changes: 11 additions & 27 deletions cmake/modules/protobuf.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit b573c6e

Please sign in to comment.