-
Notifications
You must be signed in to change notification settings - Fork 61
Description
This is a note for those of you trying to compile wxWidgets and wxLua on Windows 10/11 using MSVC Build Tools (in my case: Visual Studio 2022 Build Tools v17.14.23) on the command line. There’s a noticeable difference between wxWidgets v3.2.8.1 and v3.2.9 in how configuration types are installed:
wxWidgets v3.2.8.1 (and before) installs:
wxWidgets\lib\vc_x64_lib\mswu\build.cfg
wxWidgets v3.2.9 installs:
wxWidgets\lib\vc_x64_lib\mswu\build.cfg
wxWidgets\lib\vc_x64_lib\mswud <empty>
This is an annoying side effect of PR wxWidgets/wxWidgets#25442. See and compare code changes in:
https://github.com/wxWidgets/wxWidgets/blob/v3.2.8.1/build/cmake/install.cmake#L39
https://github.com/wxWidgets/wxWidgets/blob/v3.2.9/build/cmake/install.cmake#L41
The side effect manifests in wxLua cmake error messages ...
# CUSTOMBUILD : * warning : Could not find wxWidgets! Please see help above.
CUSTOMBUILD : warning : Unable to find requested wxWidgets component : ...
..., because FindwxWidgets() (called from cmake installation) thinks there are two configuration types to be considered (here: mswu and mswud), but mswud is not present.
The check for configuration types is basically just verifying if the corresponding directories exist. It doesn’t actually confirm the presence of configuration type data (like build.cfg), and this is true for both MSVC’s older CMake version v3.31.6 and the latest official CMake version v4.2.1.
- MSVC 2022 Build Tools v17.14.23 cmake version is 3.31.6-msvc6: https://github.com/Kitware/CMake/blob/v3.31.6/Modules/FindwxWidgets.cmake#L603
- Current cmake version is v4.2.1: https://github.com/Kitware/CMake/blob/v4.2.1/Modules/FindwxWidgets.cmake#L767
Since the issue lies between wxWidgets and CMake and isn’t directly related to wxLua, consider this just a warning. I had to manually delete the empty directory wxWidgets\lib\vc_x64_lib\mswud to get wxLua to compile.