add CMakeLists.txt to root and libs

Add cmake support for building and installing shared library and header files