TFLite CMake suggestion: option `TFLITE_ENABLE_GLES3` and changes for OpenGL ES Delegate build
Can't believe the month has passed 😱 Will be glad if I can get an opinion.  Hi @zichuan-wei Can you please review this PR ? Thank you! Update: the following error was generated when set `TFLITE_ENABLE_GLES3=OFF`, and when `TFLITE_ENABLE_GLES3=ON` everything is fine.

Hi @luncliff, thanks for your patch. I have tried your patch on Mac, with NDK 26. And I got the following error:

```
ld.lld: error: undefined symbol: tflite::gpu::gl::GetOpenGlErrors()
>>> referenced by async_buffers.cc
>>>               CMakeFiles/tensorflow-lite.dir/delegates/gpu/async_buffers.cc.o:(tflite::gpu::AsyncBuffer::MapAHardwareBufferToGlBuffer())
[ 55%] Building C object _deps/xnnpack-build/CMakeFiles/microkernels-all.dir/src/qs8-gemm/gen/qs8-gemm-4x16c4-minmax-rndnu-neon-mlal-ld1r.c.o

ld.lld: error: undefined symbol: eglGetProcAddress
>>> referenced by async_buffers.cc
>>>               CMakeFiles/tensorflow-lite.dir/delegates/gpu/async_buffers.cc.o:(tflite::gpu::AsyncBuffer::MapAHardwareBufferToGlBuffer())
>>> referenced by async_buffers.cc
>>>               CMakeFiles/tensorflow-lite.dir/delegates/gpu/async_buffers.cc.o:(tflite::gpu::AsyncBuffer::MapAHardwareBufferToGlBuffer())

ld.lld: error: undefined symbol: glGenBuffers
>>> referenced by async_buffers.cc
>>>               CMakeFiles/tensorflow-lite.dir/delegates/gpu/async_buffers.cc.o:(tflite::gpu::AsyncBuffer::AllocateOpenGlBuffer())

ld.lld: error: undefined symbol: glBindBuffer
>>> referenced by async_buffers.cc
>>>               CMakeFiles/tensorflow-lite.dir/delegates/gpu/async_buffers.cc.o:(tflite::gpu::AsyncBuffer::AllocateOpenGlBuffer())
>>> referenced by async_buffers.cc
>>>               CMakeFiles/tensorflow-lite.dir/delegates/gpu/async_buffers.cc.o:(tflite::gpu::AsyncBuffer::AllocateOpenGlBuffer())

ld.lld: error: undefined symbol: glBufferData
>>> referenced by async_buffers.cc
>>>               CMakeFiles/tensorflow-lite.dir/delegates/gpu/async_buffers.cc.o:(tflite::gpu::AsyncBuffer::AllocateOpenGlBuffer())

ld.lld: error: undefined symbol: tflite::gpu::gl::WaitFdGpu(int)
>>> referenced by delegate.cc
>>>               CMakeFiles/tensorflow-lite.dir/delegates/gpu/delegate.cc.o:(tflite::gpu::(anonymous namespace)::DelegateAsyncKernel::Eval(TfLiteOpaqueContext*, TfLiteOpaqueNode*, TfLiteExecutionTask*))

ld.lld: error: undefined symbol: tflite::gpu::gl::EglEnvironment::NewEglEnvironment(std::__ndk1::unique_ptr<tflite::gpu::gl::EglEnvironment, std::__ndk1::default_delete<tflite::gpu::gl::EglEnvironment>>*)
>>> referenced by delegate.cc
>>>               CMakeFiles/tensorflow-lite.dir/delegates/gpu/delegate.cc.o:(tflite::gpu::(anonymous namespace)::DelegateAsyncKernel::Eval(TfLiteOpaqueContext*, TfLiteOpaqueNode*, TfLiteExecutionTask*))

ld.lld: error: undefined symbol: tflite::gpu::gl::EglEnvironment::~EglEnvironment()
>>> referenced by delegate.cc
>>>               CMakeFiles/tensorflow-lite.dir/delegates/gpu/delegate.cc.o:(tflite::gpu::(anonymous namespace)::DelegateAsyncKernel::Eval(TfLiteOpaqueContext*, TfLiteOpaqueNode*, TfLiteExecutionTask*))
>>> referenced by delegate.cc
>>>               CMakeFiles/tensorflow-lite.dir/delegates/gpu/delegate.cc.o:(tflite::gpu::(anonymous namespace)::DelegateAsyncKernel::Eval(TfLiteOpaqueContext*, TfLiteOpaqueNode*, TfLiteExecutionTask*))

ld.lld: error: undefined symbol: tflite::gpu::gl::CreateFdGpu()
>>> referenced by delegate.cc
>>>               CMakeFiles/tensorflow-lite.dir/delegates/gpu/delegate.cc.o:(tflite::gpu::(anonymous namespace)::DelegateAsyncKernel::Eval(TfLiteOpaqueContext*, TfLiteOpaqueNode*, TfLiteExecutionTask*))
```

Looks like I can not get the gl `.so` file. Can you give some advice to fix the issue? I think linkage with libGLES.so and compile macro has some error.
I will try with NDK 26 on my device within days.

Maybe additional commits will be appended @luncliff Thanks for your reply. It's my mistake, the error happens when `TFLITE_ENABLE_GLES3=OFF`. And when I set `TFLITE_ENABLE_GLES3=ON`, everything is ok. You saved me. Hi @zichuan-wei Can you please review this PR ? Thank you! Hi @zichuan-wei Can you please review this PR ? Thank you! If I have to rebase with the master, please let me know  @zichuan-wei 
Hi, I'm maintaining [vcpkg](https://github.com/microsoft/vcpkg) registry for TensorFlow Lite.

I was patching CMakeLists.txt files to support multiple platforms, but the difference is getting bigger since 2.11
Will be glad if I can submit those changes upstream.

## Changes

* Create CMake build option `TFLITE_ENABLE_GLES3`
* Use `find_package(OpenGL)` to use `OpenGL::GLES3` https://cmake.org/cmake/help/latest/module/FindOpenGL.html
* Use `TFLITE_TARGET_PRIVATE_DEFINITIONS` for ease of macro search

### Android(EGL, OpenGL)

*  Include related sources under `"${TFLITE_SOURCE_DIR}/delegates/gpu/cl"`

### Flatbuffers

* Run `flatc` on `${TFLITE_SOURCE_DIR}/delegates/gpu/gl/*.fbs`

## Example

The PR contains CMakePresets for Android.

After Git clone, 

```ps1
cmake --preset arm64-android -S tensorflow/lite -DFLATBUFFERS_FLATC_EXECUTABLE:FILEPATH="...\flatc.exe"
```

```ps1
cmake --build cmake_build
```

## References

May collide with the following PR

* #61381 

In-use patch files.

* https://github.com/luncliff/vcpkg-registry/pull/131
* https://github.com/luncliff/vcpkg-registry/pull/117