[CMakeLists] fix bug on older cmake in last commit