improve CMake support

improve CMake support