mesonbuild / meson

The Meson Build System
http://mesonbuild.com
Apache License 2.0
5.3k stars 1.52k forks source link

Using WxWidgts on Windows #13180

Open bilaljo opened 2 weeks ago

bilaljo commented 2 weeks ago

Hi there,

I have installed the latest version of Meson, CMake and WxWidgets on Windows 10 and tried to include the WxWidgets dependency on Windows. My Python version is 3.10. The compiler is the MSVC Compiler (2022). However, I get the following error message with the following code:

wx = dependency('wxwidgets')

Runtime dependency wxwidgets found: NO (tried config-tool)

I tried to enforce this with cmake (method: cmake) but it was ignored. WxWidgets is installed in the default path and other libraries like libtorch or spdlog are found. After googeling I figured out that config-tool is Unix only. This StackOverflow answer says that this should have been fixed since version 0.51.

https://stackoverflow.com/a/54197888/12585571

Thank you very much.

Kind regards

eli-schwartz commented 2 weeks ago

I tried to enforce this with cmake (method: cmake) but it was ignored.

Dependencies without custom definitions in the meson source code automatically implement the pkg-config and cmake methods. Dependencies with custom definitions support whichever methods the python code says to implement. In this case,

https://github.com/mesonbuild/meson/blob/a0ff14551266c87919f5b4b1469b7be0ef0a052e/mesonbuild/dependencies/ui.py#L147-L184

It's defined as an exclusive ConfigToolDependency. This could be changed but would require a proposal/PR and wouldn't apply before meson 1.5.0

This StackOverflow answer says that this should have been fixed since version 0.51.

The answer says that using the wx-config provided by mingw was fixed in meson 0.51.0.