Revert "Simplify CMakeLists.txt, avoid problems of packagers"

This reverts commit c1b032719fedb48ac8519886fe855e4458957f58.
It didn't solve anything for any complainer.