I am trying to build my own ocl kernel in opencv 3.x. I was looking into both opencv source code and found out that the host source code calls ocl module (in *.cl file) using ocl::Kernel and ocl::ProgramSource (as mentioned in LINK and DOC).
It seems that in opencv module there is auto-generated *.hpp and *.cpp file (e.g. for modules/imgproc -> opencl_kernels_imgproc.hpp and opencl_kernels_imgproc.cpp) These files seemed to be generated based on *.cl file.
My question is, how to auto-generate these files for your custom kernel? I am guessing that it might be a CMAKE trick, but I cannot really found it. Would very much appreciated, if anyone could point me to the code/configure that do that.
Thank you.