Improvements to CMakeLists.txt

This is second part of my improvements.