How to Solve this Parse error ??

You cannot use Makefile syntax in CMake. You’ll need to use a foreach loop and handle this expansion in CMake code instead.