From ae87dcf167de8f2d8cdc7ed431a243d85aa9fbfd Mon Sep 17 00:00:00 2001 From: coxla1 <69416826+coxla1@users.noreply.github.com> Date: Wed, 6 Aug 2025 09:55:28 +0200 Subject: [PATCH 1/2] fix: recent versions of protobuf have a hard time with libUPB Workaround from https://github.com/protocolbuffers/protobuf/issues/18307 --- CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b731d1d..a48d03f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,12 @@ project(snfm) set ( Protobuf_USE_STATIC_LIBS ON ) find_package(Protobuf REQUIRED) +find_library (UPB_LIBRARIES NAMES upb) +if (UPB_LIBRARIES) + add_library(protobuf::libupb STATIC IMPORTED) + add_executable(protobuf::protoc-gen-upb IMPORTED) + add_executable(protobuf::protoc-gen-upbdefs IMPORTED) + add_executable(protobuf::protoc-gen-upb_minitable IMPORTED) find_package(gRPC CONFIG REQUIRED) find_package(yaml-cpp REQUIRED) # Force wxwidgets to turn off debug build @@ -126,4 +132,5 @@ add_custom_command( TARGET send_file POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/snfm_user_manual.md - ${CMAKE_CURRENT_BINARY_DIR}/snfm_user_manual.md) \ No newline at end of file + + ${CMAKE_CURRENT_BINARY_DIR}/snfm_user_manual.md) From df3f7a365d793b493a0705d3f04a66087996c087 Mon Sep 17 00:00:00 2001 From: coxla1 <69416826+coxla1@users.noreply.github.com> Date: Wed, 6 Aug 2025 09:57:46 +0200 Subject: [PATCH 2/2] oops --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a48d03f..dfa3670 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,7 @@ if (UPB_LIBRARIES) add_executable(protobuf::protoc-gen-upb IMPORTED) add_executable(protobuf::protoc-gen-upbdefs IMPORTED) add_executable(protobuf::protoc-gen-upb_minitable IMPORTED) +endif() find_package(gRPC CONFIG REQUIRED) find_package(yaml-cpp REQUIRED) # Force wxwidgets to turn off debug build @@ -134,3 +135,4 @@ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/snfm_user_manual.md ${CMAKE_CURRENT_BINARY_DIR}/snfm_user_manual.md) +