I have many different scenes for my game, eventually they will be merged into the single final application. But during development, I decoupled them as much as possible so I can work independently on each of them.
For testing reason, I have separate derived Application class to setup each scene. So I can use
URHO3D_DEFINE_APPLICATION_MAIN(XXXXSceneTestApplication)
and CMakeList
# Setup target with resource copying
setup_main_executable ()
would make any one to be run as the main entry point.
The problem is: I have to uncomment the URHO3D_DEFINE_APPLICATION_MAIN
line in the TestApplication I want to test and also comment URHO3D_DEFINE_APPLICATION_MAIN
in all other xxxxApplication file.
I know we can use multiple add_executable(target_xxx {src})
in CMakeList to have multiple targets build at the same time, and run whichever we want.
I wonder if I can do similar thing easily with Urho3D cmake setting?