Updated CMake version required to 2.8. Added support for building static library and installing.