How to define an entry point when using `paraview_client_add`?

I would like to make ParaView accept custom command line arguments in my ParaView custom application. To achieve that, I want to pass the optional argument of type vtkCLIOptions* to the pqPVApplicationCore constructor.

You can do so by explicitly instantiating pqPVApplicationCore, as done in the Demo2 example. Then you have to write your own entry point int main(...). The Demo2 example manually creates the executable using the add_executable CMake command. The more complex custom applications, such as the SimpleParaView example or LidarView rather use the CMake macro paraview_client_add. In this case, the entry point is in the autogenerated file. How can I pass a custom entry point (in the Demo2 example, it is DemoApp2.cxx to paraview_client_add?

I read the following in the changelog:

Custom applications can easily add their own *Configuration classes to populate vtkCLIOptions to custom options or override the default ParaView ones. If your custom code was simply checking user selections from vtkPVOptions or subclasses, change it to using the corresponding *Configuration singleton

Is there an example out there ?