CMakeLists.txt: create config.h after visiting subdirectories