From c0d8cb54fd1810c1a9bfeae3abcedce0d999efab Mon Sep 17 00:00:00 2001
From: Sergey Bronnikov <sergeyb@tarantool.org>
Date: Mon, 29 Jan 2024 14:31:50 +0300
Subject: [PATCH] cmake: fix protobuf library name

Protocol Buffers library has a name `protobufd` when CMAKE_BUILD_TYPE is
equal to "Debug". In other cases the name is `protobuf`. The patch fixes
the library name.

Follows up commit b11072a66d45 ("cmake: add dependencies for LuaJIT and
SQL fuzzers").

Follows up #4823

NO_CHANGELOG=build
NO_DOC=build
NO_TEST=build
---
 cmake/ProtobufMutator.cmake | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/cmake/ProtobufMutator.cmake b/cmake/ProtobufMutator.cmake
index 83c1a51f70..44672a7af0 100644
--- a/cmake/ProtobufMutator.cmake
+++ b/cmake/ProtobufMutator.cmake
@@ -34,7 +34,10 @@ set(PROTOBUF_INSTALL_DIR ${LPM_INSTALL_DIR}/src/${LPM_TARGET}-build/${PROTOBUF_T
 set(PROTOBUF_INCLUDE_DIRS ${PROTOBUF_INSTALL_DIR}/include)
 include_directories(${PROTOBUF_INCLUDE_DIRS})
 
-set(PROTOBUF_LIBRARIES protobufd)
+set(PROTOBUF_LIBRARIES protobuf)
+if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
+  set(PROTOBUF_LIBRARIES protobufd)
+endif(CMAKE_BUILD_TYPE)
 
 foreach(lib ${PROTOBUF_LIBRARIES})
   set(LIB_PROTOBUF_PATH ${PROTOBUF_INSTALL_DIR}/lib/lib${lib}.a)
-- 
GitLab