Skip to content

Commit

Permalink
[infra] Update protobuf to 3.20.1
Browse files Browse the repository at this point in the history
This commit updates the Protobuf library to a newer version due to the fixes this version contains.

In particular this version fixes some compilation errors being reported by GCC on Ubuntu 24.04
when the build is performed with the following flags enabled: -Werror -Wall

The removed .patch file is not required any more since the js_embed binary has been removed from protobuf
in the following pull request protocolbuffers/protobuf#4709

ONE-DCO-1.0-Signed-off-by: Tomasz Dolbniak <[email protected]>
  • Loading branch information
tomdol committed Jan 9, 2025
1 parent fb69526 commit 329c5e2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 23 deletions.
4 changes: 2 additions & 2 deletions infra/cmake/packages/ProtobufConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ endfunction(_Protobuf_module_import)
function(_Protobuf_import)
# Let's use find_package here not to export unnecessary definitions
# NOTE Here we use "exact" match to avoid possible infinite loop
find_package(protobuf EXACT 3.5.2 QUIET)
find_package(protobuf EXACT 3.20.1.0 QUIET)

if(NOT protobuf_FOUND)
set(Protobuf_FOUND FALSE PARENT_SCOPE)
Expand Down Expand Up @@ -65,7 +65,7 @@ function(_Protobuf_build)
INSTALL_DIR ${EXT_OVERLAY_DIR}
BUILD_FLAGS -fPIC
EXTRA_OPTS -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_WITH_ZLIB=OFF
IDENTIFIER "3.5.2-fix2"
IDENTIFIER "3.20.1.0"
PKG_NAME "PROTOBUF")

endfunction(_Protobuf_build)
Expand Down
18 changes: 0 additions & 18 deletions infra/cmake/packages/ProtobufSource.patch

This file was deleted.

5 changes: 2 additions & 3 deletions infra/cmake/packages/ProtobufSourceConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ function(_ProtobufSource_import)
nnas_include(OptionTools)

envoption(EXTERNAL_DOWNLOAD_SERVER "https://github.com")
envoption(PROTOBUF_URL ${EXTERNAL_DOWNLOAD_SERVER}/protocolbuffers/protobuf/archive/v3.5.2.tar.gz)
envoption(PROTOBUF_URL ${EXTERNAL_DOWNLOAD_SERVER}/protocolbuffers/protobuf/archive/v3.20.1.tar.gz)

ExternalSource_Download(PROTOBUF ${PROTOBUF_URL}
PATCH ${CMAKE_CURRENT_LIST_DIR}/ProtobufSource.patch)
ExternalSource_Download(PROTOBUF ${PROTOBUF_URL})

set(ProtobufSource_DIR ${PROTOBUF_SOURCE_DIR} PARENT_SCOPE)
set(ProtobufSource_FOUND TRUE PARENT_SCOPE)
Expand Down

0 comments on commit 329c5e2

Please sign in to comment.