Improve cmake scripts.