I took a closer look and the following message proposes significant changes to how Boost is used under Windows. Not on Unixes, I am sure that works very well, but Windows…
I am checking with the community because obviously somebody coded it this way and is probably relying on the current rules coded in meson. I do not want to submit a pull request that is going to get rejected right away.
The meson documentation says to use BOOST_ROOT, BOOST_INCLUDEDIR and/or BOOST_LIBRARYDIR environment variables if Boost is in a non-standard location.
Under Windows, there is no standard location, so meson has codified default places where it looks for Boost (in order):
There are problems with this. Assuming an installation in the root of C: makes no sense. C:\ would have the following entries: boost, doc, libs, status, tools, INSTALL, etc. Nobody would do this.
C:\local\boost_* is OK, if the meson documentation mentioned it and the user is willing and able to re/locate the boost installation to C:\local. As a minor point, I am not sure which directory would be picked up if there were multiple matches.
For Windows users then, the best course of action is to set BOOST_ROOT. But then meson computes that the include directory for the headers is $BOOST_ROOT/include. This is wrong, the include directory is simply $BOOST_ROOT. This is my first “unsolvable” issue.
The other thing meson need is to find the libraries. There is no standard location for them on the system, but there is a standard location within $BOOST_ROOT if the user followed the Boost Getting Started on Windows guide. This location is $BOOST_ROOT/stage/lib. To my knowledge, there is no other established default or standard location for the libraries.
Sadly, meson is not looking there. It searches for the first directory that matches $BOOST_ROOT/lib64* or $BOOST_ROOT/lib32* (depending on the compiler’s address model). On the other hand, this is a nice feature for Windows users who need cross-compilation. This is my second issue with the Boost dependency. This is not where my libraries are and BOOST_LIBRARYDIR is only used if you have not set BOOST_ROOT (which I did to get around the other problem)
My proposition is this. Under Windows, one must define BOOST_ROOT since there is no standard location. In a non-cross compile, meson looks for libraries in $BOOST_ROOT/stage/lib. In a cross compile, meson looks in $BOOST_ROOT/stage/lib64 or lib32 (no wildcard here). If BOOST_LIBRARYDIR is set, it wins. If BOOST_INCLUDEDIR is set, it becomes the include directory to add. We add documentation to explain all this.
--
You received this message because you are subscribed to the Google Groups "The Meson Build System" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mesonbuild+...@googlegroups.com.
To post to this group, send email to meson...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/mesonbuild/3aec7a02-78b7-4b05-a868-e9796f7b61bd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.