fix protobuf-cpp build on mingw-clang (#5877)

pull/5880/head
Doekin 6 months ago committed by GitHub
parent fca4e98961
commit b276fea04f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      packages/p/protobuf-cpp/xmake.lua

@ -48,7 +48,7 @@ package("protobuf-cpp")
add_links("protoc", "protobuf", "utf8_range", "utf8_validity")
end
if is_plat("linux", "bsd") then
if is_plat("linux", "bsd", "mingw") then
add_syslinks("m", "pthread")
end
@ -117,6 +117,9 @@ package("protobuf-cpp")
if version:ge("26.1") then
io.replace("cmake/abseil-cpp.cmake", "BUILD_SHARED_LIBS AND MSVC", "FALSE", {plain = true})
end
if package:is_plat("windows", "mingw") then
io.replace("src/google/protobuf/port_def.inc", "#define PROTOBUF_DESCRIPTOR_WEAK_MESSAGES_ALLOWED", "", {plain = true})
end
local configs = {
"-Dprotobuf_BUILD_TESTS=OFF",

Loading…
Cancel
Save