Add CMake support for static libraries.