This requires CMake 2.8.5. But we need a solution working for all CMake versions starting from 2.6.3.