Using the mongodb cxx driver in a cmake c++ project
<p>I am new to cmake and I want to connect to a mongodb using c++ and the latest mongodb cxx driver. I managed to compile and install the driver but now I stuck with using it in my cmake project.</p>

<p>I installed the mongodb driver with the default settings, so it's located under /usr/local/lib/include/mongocxx/v_noabi/mongocxx.</p>

<p>In my cmake file i manged to get the includes resolved with:</p>

<p>include_directories(/usr/local/lib/include/mongocxx/v_noabi /usr/local/lib/include/bsoncxx/v_noabi)</p>

<p>but I don't know how to actually link the driver libs to my executable. Could any one please help me?</p>