*/CMakeLists.txt: better use of conditionals to handle diff. CMake versions