simplify subdirectory CMakeLists.txt and make them a bit more autonomous