CMake error trying to add opencv to embarcadero C++ builder 10.3

With Embarcadero RAD Studio 12.3, you can now compile OpenCV (including VTK). This is done using the new toolchain centered around the BCC64X compiler. According to David Millington from Embarcadero, all projects compiled with MinGW can also be compiled with BCC64X (Windows Modern). I’ve tried it myself and can confirm that OpenCV and VTK build without problems. I was also able to use other projects such as MMTF, Eigen3, and spglib.
Note:
This requires a modified version of CMake from Embarcadero, which can be obtained via GetIt. This is the only way to make it work. Embarcadero wants its version of CMake to be merged into the CMake master branch but until then only the Embarcadero CMake version can be used.

By modifying the batch script “make-opencv.bat” you can also clone and build the latest version of OpenCV. By modifying “setup.bat” you can choose whether to create a “Release” or “Debug” version. “setup.bat” is later called by the respective build scripts, such as “make-opencv.bat”.

I hope it helps those who want to compile open source libraries with RAD Studio 12.3 that were not possible before.