Changed some compiler options to reduce the size of .lib files.
Added CMake support.