added a CMakeLists.txt for compiling this project as library, but you
can still just copy into your project folder. Therefore it's just a new
option.
Commented out some unused variables to avoid compiler warnings