generating CMakeLists.txt for R extension