KinomotoMio commented on code in PR #6503: URL: https://github.com/apache/opendal/pull/6503#discussion_r2277830282
########## bindings/cpp/CMakeLists.txt: ########## @@ -144,6 +153,27 @@ if (OPENDAL_ENABLE_ASYNC) endif() target_link_libraries(opendal_cpp PUBLIC ${RUST_LIB}) target_link_libraries(opendal_cpp PRIVATE ${CMAKE_DL_LIBS}) + +if(FEATURES MATCHES "services-rocksdb") + if(DEFINED ENV{ROCKSDB_LIB_DIR}) + find_library(ROCKSDB_LIB rocksdb PATHS $ENV{ROCKSDB_LIB_DIR} NO_DEFAULT_PATH) + target_link_libraries(opendal_cpp PUBLIC ${ROCKSDB_LIB}) + endif() +endif() + +if(FEATURES MATCHES "services-hdfs") + if(DEFINED ENV{HADOOP_HOME}) + find_library(HDFS_LIB NAMES hdfs PATHS $ENV{HADOOP_HOME}/lib/native NO_DEFAULT_PATH) + if(HDFS_LIB) + target_link_libraries(opendal_cpp PUBLIC ${HDFS_LIB}) + endif() + else() + find_library(HDFS_LIB hdfs) + if(HDFS_LIB) + target_link_libraries(opendal_cpp PUBLIC ${HDFS_LIB}) + endif() + endif() +endif() Review Comment: In the early work, I ran into an error like "undefined reference to `hdfsFlush'". ([link](https://github.com/apache/opendal/actions/runs/16922017927/job/47950158295)) But now it seems to be working fine, so I just removed that part. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@opendal.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org