parent
c6c16d67fc
commit
f447191d92
@ -1,36 +0,0 @@
|
||||
From: =?utf-8?q?Timo_R=C3=B6hling?= <roehling@debian.org>
|
||||
Date: Fri, 14 Jul 2023 15:49:28 +0200
|
||||
Subject: Fix regression in FindProtobuf.cmake
|
||||
|
||||
Bug: https://gitlab.kitware.com/cmake/cmake/-/merge_requests/8629
|
||||
---
|
||||
Modules/FindProtobuf.cmake | 9 +++------
|
||||
1 file changed, 3 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/Modules/FindProtobuf.cmake b/Modules/FindProtobuf.cmake
|
||||
index b046fcc..5cad383 100644
|
||||
--- a/Modules/FindProtobuf.cmake
|
||||
+++ b/Modules/FindProtobuf.cmake
|
||||
@@ -499,11 +499,7 @@ if(Protobuf_INCLUDE_DIR)
|
||||
math(EXPR _PROTOBUF_MAJOR_VERSION "${Protobuf_LIB_VERSION} / 1000000")
|
||||
math(EXPR _PROTOBUF_MINOR_VERSION "${Protobuf_LIB_VERSION} / 1000 % 1000")
|
||||
math(EXPR _PROTOBUF_SUBMINOR_VERSION "${Protobuf_LIB_VERSION} % 1000")
|
||||
- if (_PROTOBUF_MINOR_VERSION GREATER_EQUAL "21")
|
||||
- set(Protobuf_VERSION "${_PROTOBUF_MINOR_VERSION}.${_PROTOBUF_SUBMINOR_VERSION}")
|
||||
- else()
|
||||
- set(Protobuf_VERSION "${_PROTOBUF_MAJOR_VERSION}.${_PROTOBUF_MINOR_VERSION}.${_PROTOBUF_SUBMINOR_VERSION}")
|
||||
- endif()
|
||||
+ set(Protobuf_VERSION "${_PROTOBUF_MAJOR_VERSION}.${_PROTOBUF_MINOR_VERSION}.${_PROTOBUF_SUBMINOR_VERSION}")
|
||||
|
||||
if(Protobuf_DEBUG)
|
||||
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
|
||||
@@ -524,7 +520,8 @@ if(Protobuf_INCLUDE_DIR)
|
||||
"${Protobuf_PROTOC_EXECUTABLE} reveals version ${_PROTOBUF_PROTOC_EXECUTABLE_VERSION}")
|
||||
endif()
|
||||
|
||||
- if(NOT "${_PROTOBUF_PROTOC_EXECUTABLE_VERSION}" VERSION_EQUAL "${Protobuf_VERSION}")
|
||||
+ if(NOT "${_PROTOBUF_PROTOC_EXECUTABLE_VERSION}" VERSION_EQUAL "${Protobuf_VERSION}" AND
|
||||
+ NOT "${_PROTOBUF_PROTOC_EXECUTABLE_VERSION}" VERSION_EQUAL "${_PROTOBUF_MINOR_VERSION}.${_PROTOBUF_SUBMINOR_VERSION}")
|
||||
message(WARNING "Protobuf compiler version ${_PROTOBUF_PROTOC_EXECUTABLE_VERSION}"
|
||||
" doesn't match library version ${Protobuf_VERSION}")
|
||||
endif()
|
Loading…
Reference in new issue