After installing gtest, ./waf check still can't find it

On WSL 2 Ubuntu:
./waf plane build succeeds
./waf check fails with check: gtest library is required
gtest libs are installed in /usr/lib/libgtest.a and /usr/lib/libgtest_main.a

How do I get ./waf check to realize that gtest libs exist?

So there is some cfg.env.HAS_GTEST variable that is for some reason set to false.

It gets set to true here:

Do I need to for some reason run that script? Why isn’t wscript smarter in that it can figure out in real-time whether or not gtest libs are installed?