我是cmake的新手,我想使用c ++和最新的mongodb cxx驱动程序连接到mongodb.我设法编译并安装驱动程序,但现在我坚持在我的cmake项目中使用它.
我使用默认设置安装了mongodb驱动程序,因此它位于/ usr/local/lib/include/mongocxx/v_noabi/mongocxx下.
在我的cmake文件中,我管理以解决包含:
include_directories(/ usr/local/lib/include/mongocxx/v_noabi/usr/local/lib/include/bsoncxx/v_noabi)
但我不知道如何将驱动程序库链接到我的可执行文件.有人可以帮帮我吗?