Support RocksDB shared library and new unique_ptr DB::Open API

Some distributions (e.g. Fedora) ship only a shared RocksDB that exports
RocksDB::rocksdb-shared rather than RocksDB::rocksdb. The CMake target
selection now falls back to the shared target when the static one is absent.

Newer RocksDB also changed DB::Open and DB::OpenForReadOnly to take
std::unique_ptr<DB>* instead of DB**. IfcFile.cpp uses SFINAE tag dispatch
to build against both old and new APIs without version detection.
This commit is contained in:
Bruno Postle
2026-06-04 22:31:02 +01:00
committed by Thomas Krijnen
parent 5f7d9b86b8
commit 818ca6b2bc
4 changed files with 37 additions and 4 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ else()
endif()
if(WITH_ROCKSDB)
target_link_libraries(IfcParse RocksDB::rocksdb)
target_link_libraries(IfcParse ${IFCOPENSHELL_ROCKSDB_TARGET})
if(WITH_ZSTD)
target_link_libraries(IfcParse zstd::libzstd_static)
endif()