CMake buildsystem : library option added

Now we can build libraries with CMake buildsystem