Iterative Loop module for saucer
-
Using CPM
CPMFindPackage( NAME saucer-loop VERSION 1.0.0 GIT_REPOSITORY "https://github.com/saucer/loop" )
-
Using FetchContent
include(FetchContent) FetchContent_Declare(saucer-loop GIT_REPOSITORY "https://github.com/saucer/loop" GIT_TAG v1.0.0) FetchContent_MakeAvailable(saucer-loop)
Finally, link against target:
target_link_libraries(<target> saucer::loop)
Warning
This module may replace the default application loop. Therefore, it is recommended to not use or call application::finish()
!
auto app = /*...*/;
auto& loop = app->add_module<saucer::modules::loop>();
auto webview = /*...*/;
while (/*cond*/)
{
loop->iteration();
}
// or simply...
loop->run();