# Cannot find wxWidgets - no vcpkg and no HKEY

**URL:** https://discourse.cmake.org/t/cannot-find-wxwidgets-no-vcpkg-and-no-hkey/6173
**Category:** Usage
**Created:** [July 28, 2022, 8:56pm UTC](https://discourse.cmake.org/t/cannot-find-wxwidgets-no-vcpkg-and-no-hkey/6173 "2022-07-28T20:56:27Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Robert\_Kamarowski](https://discourse.cmake.org/user_avatar/discourse.cmake.org/robert_kamarowski/32/2630_2.png) [@Robert\_Kamarowski](https://discourse.cmake.org/u/Robert_Kamarowski)
#### Post date: [July 28, 2022, 8:56pm UTC](https://discourse.cmake.org/t/cannot-find-wxwidgets-no-vcpkg-and-no-hkey/6173/1 "2022-07-28T20:56:27Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Robert\_Kamarowski](https://discourse.cmake.org/user_avatar/discourse.cmake.org/robert_kamarowski/32/2630_2.png) [@Robert\_Kamarowski](https://discourse.cmake.org/u/Robert_Kamarowski)
#### Post date: [July 29, 2022, 3:20pm UTC](https://discourse.cmake.org/t/cannot-find-wxwidgets-no-vcpkg-and-no-hkey/6173/2 "2022-07-29T15:20:16Z")

</div>

Windows 11  
VS Code  
Clang++  
Ninja

---

<div class="post-metadata">

### Author: ![Robert\_Kamarowski](https://discourse.cmake.org/user_avatar/discourse.cmake.org/robert_kamarowski/32/2630_2.png) [@Robert\_Kamarowski](https://discourse.cmake.org/u/Robert_Kamarowski)
#### Post date: [August 1, 2022, 5:19pm UTC](https://discourse.cmake.org/t/cannot-find-wxwidgets-no-vcpkg-and-no-hkey/6173/3 "2022-08-01T17:19:22Z")

</div>

Anyone?

---

<div class="post-metadata">

### Author: ![McMartin](https://discourse.cmake.org/user_avatar/discourse.cmake.org/mcmartin/32/150_2.png) [@McMartin](https://discourse.cmake.org/u/McMartin)
#### Post date: [August 1, 2022, 8:35pm UTC](https://discourse.cmake.org/t/cannot-find-wxwidgets-no-vcpkg-and-no-hkey/6173/4 "2022-08-01T20:35:47Z")

</div>

> [@Robert\_Kamarowski](#):
>
> the wxwin variable set to the install location

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

---

<div class="post-metadata">

### Author: ![Robert\_Kamarowski](https://discourse.cmake.org/user_avatar/discourse.cmake.org/robert_kamarowski/32/2630_2.png) [@Robert\_Kamarowski](https://discourse.cmake.org/u/Robert_Kamarowski)
#### Post date: [August 2, 2022, 3:48pm UTC](https://discourse.cmake.org/t/cannot-find-wxwidgets-no-vcpkg-and-no-hkey/6173/5 "2022-08-02T15:48:19Z")

</div>

As a system variable on Windows 11:

wxwin=d:\wxWidgets\3.1.5

---

<div class="post-metadata">

### Author: ![jtxa](https://discourse.cmake.org/user_avatar/discourse.cmake.org/jtxa/32/1535_2.png) [@jtxa](https://discourse.cmake.org/u/jtxa)
#### Post date: [August 6, 2022, 10:14pm UTC](https://discourse.cmake.org/t/cannot-find-wxwidgets-no-vcpkg-and-no-hkey/6173/6 "2022-08-06T22:14:15Z")

</div>

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](https://gitlab.kitware.com/cmake/cmake/-/blob/master/Modules/FindwxWidgets.cmake#L459)

---

<div class="post-metadata">

### Author: ![Robert\_Kamarowski](https://discourse.cmake.org/user_avatar/discourse.cmake.org/robert_kamarowski/32/2630_2.png) [@Robert\_Kamarowski](https://discourse.cmake.org/u/Robert_Kamarowski)
#### Post date: [August 7, 2022, 2:34pm UTC](https://discourse.cmake.org/t/cannot-find-wxwidgets-no-vcpkg-and-no-hkey/6173/7 "2022-08-07T14:34:37Z")

</div>

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”  
> )
