Can't find wxWidgets 3.1 with cmake

I’m trying to build SuperSlicer
in Fedora 34, but cmake can not find wxWidgets 3.1.
I have tried “everything” and now I have even built and installed the latest wxWidgets from github. My wx-config is placed in /usr/local/bin/ and apparently that folder was not in my $PATH so I had to run export PATH=/usr/local/bin/:$PATH and now when I run wx-config --version I get 3.1.6 But still cmake can’t find it.

How can I get cmake to find my wxWidget install?