[CMake] Solved bug #236. Marginally changed the source/header listing policy to avoid similar bugs in the future.