Kaynağa Gözat

Fix abseil linker error for BUNDLE_DATABASE=ON builds

Newer abseil (2505+) splits log_internal_check_op into a separate
library. Link it explicitly to smartbotic_db_proto when available
to fix undefined reference errors on systems with newer abseil.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fszontagh 2 ay önce
ebeveyn
işleme
cfcf57bbd2
1 değiştirilmiş dosya ile 6 ekleme ve 0 silme
  1. 6 0
      CMakeLists.txt

+ 6 - 0
CMakeLists.txt

@@ -27,6 +27,12 @@ else()
     message(FATAL_ERROR "smartbotic-database submodule not found. Run: git submodule update --init --recursive")
 endif()
 
+# Workaround: newer abseil (2505+) splits log_internal_check_op into its own library.
+# The proto target needs it but the submodule CMake doesn't link it explicitly.
+if(TARGET absl::log_internal_check_op AND TARGET smartbotic_db_proto)
+    target_link_libraries(smartbotic_db_proto PUBLIC absl::log_internal_check_op)
+endif()
+
 # Libraries
 add_subdirectory(lib)