diff --git a/infra/cmake/packages/ProtobufConfig.cmake b/infra/cmake/packages/ProtobufConfig.cmake index f8e9ff1f951..974fe203a3a 100644 --- a/infra/cmake/packages/ProtobufConfig.cmake +++ b/infra/cmake/packages/ProtobufConfig.cmake @@ -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.2.0 QUIET) if(NOT protobuf_FOUND) set(Protobuf_FOUND FALSE PARENT_SCOPE) @@ -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.2.0" PKG_NAME "PROTOBUF") endfunction(_Protobuf_build) diff --git a/infra/cmake/packages/ProtobufSource.patch b/infra/cmake/packages/ProtobufSource.patch deleted file mode 100644 index 9a83a80e480..00000000000 --- a/infra/cmake/packages/ProtobufSource.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/cmake/libprotoc.cmake -+++ b/cmake/libprotoc.cmake -@@ -209,10 +209,14 @@ - ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types/timestamp.js - ) - add_executable(js_embed ${protobuf_source_dir}/src/google/protobuf/compiler/js/embed.cc) -+set(JS_EMBED_EXEC "js_embed") -+if(DEFINED ENV{EXTERNAL_JS_EMBED}) -+ set(JS_EMBED_EXEC "$ENV{EXTERNAL_JS_EMBED}") -+endif() - add_custom_command( - OUTPUT ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types_embed.cc - DEPENDS js_embed ${js_well_known_types_sources} -- COMMAND js_embed ${js_well_known_types_sources} > ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types_embed.cc -+ COMMAND ${JS_EMBED_EXEC} ${js_well_known_types_sources} > ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types_embed.cc - ) - - add_library(libprotoc ${protobuf_SHARED_OR_STATIC} diff --git a/infra/cmake/packages/ProtobufSourceConfig.cmake b/infra/cmake/packages/ProtobufSourceConfig.cmake index a1704e53d72..88c8c86cbb4 100644 --- a/infra/cmake/packages/ProtobufSourceConfig.cmake +++ b/infra/cmake/packages/ProtobufSourceConfig.cmake @@ -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.2.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)