Cannot find wxWidgets - no vcpkg and no HKEY

I searched other messages and couldn’t find a reference to my particular problem.

I have wxWidgets installed with just the wxwin variable set to the install location. I looked at the FindwxWidgets.cmake file, and it only searches vcpkg (which I don’t have installed), and the HKEY registry (which is not installed). Is there a work around?
Thank you,
Bob K.

Windows 11
VS Code
Clang++
Ninja

Anyone?

Which variable exactly? And how/where are you setting it?

As a system variable on Windows 11:

wxwin=d:\wxWidgets\3.1.5

What kind of FindwxWidgets.cmake did you look at? The official one supports the envvar for more than a decade or so:

https://gitlab.kitware.com/cmake/cmake/-/blob/master/Modules/FindwxWidgets.cmake#L459

The one I have is in the location:

C:\Program Files\CMake\share\cmake-3.24\Modules

This is what the code looks like in the FindwxWidgets.cmake file I have:

#-------------------------------------------------------------------

WIN32: Start actual work.

#-------------------------------------------------------------------

Look for an installation tree.

find_path(wxWidgets_ROOT_DIR
NAMES include/wx/wx.h
PATHS
ENV wxWidgets_ROOT_DIR
ENV WXWIN
“[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\wxWidgets_is1;Inno Setup: App Path]” # WX 2.6.x
C:/
D:/
ENV ProgramFiles
PATH_SUFFIXES
wxWidgets-3.1.0
wxWidgets-3.0.2
wxWidgets-3.0.1
wxWidgets-3.0.0
wxWidgets-2.9.5
wxWidgets-2.9.4
wxWidgets-2.9.3
wxWidgets-2.9.2
wxWidgets-2.9.1
wxWidgets-2.9.0
wxWidgets-2.8.9
wxWidgets-2.8.8
wxWidgets-2.8.7
wxWidgets-2.8.6
wxWidgets-2.8.5
wxWidgets-2.8.4
wxWidgets-2.8.3
wxWidgets-2.8.2
wxWidgets-2.8.1
wxWidgets-2.8.0
wxWidgets-2.7.4
wxWidgets-2.7.3
wxWidgets-2.7.2
wxWidgets-2.7.1
wxWidgets-2.7.0
wxWidgets-2.7.0-1
wxWidgets-2.6.4
wxWidgets-2.6.3
wxWidgets-2.6.2
wxWidgets-2.6.1
wxWidgets-2.5.4
wxWidgets-2.5.3
wxWidgets-2.5.2
wxWidgets-2.5.1
wxWidgets
DOC “wxWidgets base/installation directory”
)