strands-project / mongodb_store

MongoDB tools for storing and analysing runs of ROS systems.
BSD 3-Clause "New" or "Revised" License
49 stars 72 forks source link

Mongo C++ header location not exposed to depending packages on Kinetic/Xenial #176

Closed ronwalf closed 7 years ago

ronwalf commented 7 years ago

On Ubuntu 16.04, the legacy drivers for mongo-cxx-driver are no longer included. FindMongoClient.cmake works for building mongodb_store, but depending packages don't have access to that cmake file, and thus can't find the mongo cxx headers. I'm not a cmake expert, nor do I have particular knowledge about how things should be done here, but exporting the header location in the catkin_package fixed the build for me.

diff --git a/mongodb_store/CMakeLists.txt b/mongodb_store/CMakeLists.txt
index d43d32f..ece2e0d 100644
--- a/mongodb_store/CMakeLists.txt
+++ b/mongodb_store/CMakeLists.txt
@@ -48,8 +48,8 @@ generate_messages(

 catkin_package(
- INCLUDE_DIRS include
- LIBRARIES message_store 
+ INCLUDE_DIRS include ${MongoClient_INCLUDE_DIR}
+ LIBRARIES message_store
  CATKIN_DEPENDS mongodb_store_msgs
  DEPENDS MongoClient
 )
hawesie commented 7 years ago

Thanks. I'll try to fix this soon.