Skip to content

Add support to build libpeas with Visual Studio

Chun-wei Fan requested to merge meson.msvc into master

Hi,

This MR is opened to support builds using Visual Studio and the like for Windows, where:

  • Add better detection methods for Python 2.x and 3.x, since multiple Python installations may exist on Windows and one may be building for Python installations that are not the one that is used to run Meson.

  • Minor fixes to get rid of MinGW-isms in terms of Windows headers inclusion.

  • Replace unixy commands (cp and the like) in the Meson build files with Python script calls, since Visual Studio-like builds are typically ran in command lines that do not support those unixy commands.

  • Improve module search on Windows, as Meson do not add a lib prefix to the module DLL filenames by default, on Visual Studio builds.

  • Fix tests on Visual Studio builds, where paths are constructed differently from *NIX systems, in terms of directory separators. Also make sure that we export items as needed.

  • Avoid hardcoding paths on Windows, where appropriate

  • Improve search for Lua, since the Windows build files there do not generate pkg-config files for us.

With blessings, thank you!

Merge request reports