Using CMake and swig to Connect Python to C

I started using cmake and SWIG on a project recently. This post is to document my experience with these technologies. Here’s a bit of background. The project I’m referring to, among other things, has an API, written in C, that hooks into MongoDB. Since it’s an API, I wanted to create a shared object so that I could implement various interfaces into it. The first interface I wrote was also in C, so linking to this library was no problem.