Thread g_main_loop, cmake